From 3beea23c1b9a4b9023fe06b4524680b7b8b9ff83 Mon Sep 17 00:00:00 2001 From: Christian Pirker Date: Tue, 13 May 2014 11:50:39 +0000 Subject: [PATCH] ARM: Additional test files for thumb fixups git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208691 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/ARM/thumb2be-beq.w-encoding.s | 12 ++++++++++++ test/MC/ARM/thumb2be-movt-encoding.s | 12 ++++++++++++ test/MC/ARM/thumb2be-movw-encoding.s | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 test/MC/ARM/thumb2be-beq.w-encoding.s create mode 100644 test/MC/ARM/thumb2be-movt-encoding.s create mode 100644 test/MC/ARM/thumb2be-movw-encoding.s diff --git a/test/MC/ARM/thumb2be-beq.w-encoding.s b/test/MC/ARM/thumb2be-beq.w-encoding.s new file mode 100644 index 00000000000..994e15b1238 --- /dev/null +++ b/test/MC/ARM/thumb2be-beq.w-encoding.s @@ -0,0 +1,12 @@ +// RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -mcpu=cortex-a8 -filetype=obj < %s | llvm-objdump -arch=thumb -s - | FileCheck %s --check-prefix=CHECK-LE +// RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -mcpu=cortex-a8 -filetype=obj < %s | llvm-objdump -arch=thumbeb -s - | FileCheck %s --check-prefix=CHECK-BE + .syntax unified + .code 16 + .thumb_func +foo: + beq.w bar + +// CHECK-LE: Contents of section .text: +// CHECK-LE-NEXT: 0000 3ff4feaf +// CHECK-BE: Contents of section .text: +// CHECK-BE-NEXT: 0000 f43faffe diff --git a/test/MC/ARM/thumb2be-movt-encoding.s b/test/MC/ARM/thumb2be-movt-encoding.s new file mode 100644 index 00000000000..f879de77b2b --- /dev/null +++ b/test/MC/ARM/thumb2be-movt-encoding.s @@ -0,0 +1,12 @@ +// RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -mcpu=cortex-a8 -filetype=obj < %s | llvm-objdump -arch=thumb -s - | FileCheck %s --check-prefix=CHECK-LE +// RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -mcpu=cortex-a8 -filetype=obj < %s | llvm-objdump -arch=thumbeb -s - | FileCheck %s --check-prefix=CHECK-BE + .syntax unified + .code 16 + .thumb_func +foo: + movt r9, :upper16:(_bar) + +// CHECK-LE: Contents of section .text: +// CHECK-LE-NEXT: 0000 c0f20009 +// CHECK-BE: Contents of section .text: +// CHECK-BE-NEXT: 0000 f2c00900 diff --git a/test/MC/ARM/thumb2be-movw-encoding.s b/test/MC/ARM/thumb2be-movw-encoding.s new file mode 100644 index 00000000000..bc01d3e2946 --- /dev/null +++ b/test/MC/ARM/thumb2be-movw-encoding.s @@ -0,0 +1,12 @@ +// RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -mcpu=cortex-a8 -filetype=obj < %s | llvm-objdump -arch=thumb -s - | FileCheck %s --check-prefix=CHECK-LE +// RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -mcpu=cortex-a8 -filetype=obj < %s | llvm-objdump -arch=thumbeb -s - | FileCheck %s --check-prefix=CHECK-BE + .syntax unified + .code 16 + .thumb_func +foo: + movw r9, :lower16:(_bar) + +// CHECK-LE: Contents of section .text: +// CHECK-LE-NEXT: 0000 40f20009 +// CHECK-BE: Contents of section .text: +// CHECK-BE-NEXT: 0000 f2400900 -- 2.34.1