summaryrefslogtreecommitdiff
path: root/test/MC/ARM
diff options
context:
space:
mode:
authorChristian Pirker <cpirker@a-bix.com>2014-05-13 17:06:51 +0000
committerChristian Pirker <cpirker@a-bix.com>2014-05-13 17:06:51 +0000
commitad5d56c16825b96f7e3e6a206d1ac55de744bfe3 (patch)
tree0089c09fffa497f03b49f309ccac4699deecddb8 /test/MC/ARM
parentdd255b3be7956e2000eb976878997018b92a7c9e (diff)
downloadllvm-ad5d56c16825b96f7e3e6a206d1ac55de744bfe3.tar.gz
llvm-ad5d56c16825b96f7e3e6a206d1ac55de744bfe3.tar.bz2
llvm-ad5d56c16825b96f7e3e6a206d1ac55de744bfe3.tar.xz
ARM: Additional test files for thumb fixups (checked with llvm-mv -show-encoding)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ARM')
-rw-r--r--test/MC/ARM/thumb2be-b.w-encoding.s19
-rw-r--r--test/MC/ARM/thumb2be-beq.w-encoding.s19
-rw-r--r--test/MC/ARM/thumb2be-movt-encoding.s19
-rw-r--r--test/MC/ARM/thumb2be-movw-encoding.s19
4 files changed, 32 insertions, 44 deletions
diff --git a/test/MC/ARM/thumb2be-b.w-encoding.s b/test/MC/ARM/thumb2be-b.w-encoding.s
index 8e162abb1d..2c3e31b3d9 100644
--- a/test/MC/ARM/thumb2be-b.w-encoding.s
+++ b/test/MC/ARM/thumb2be-b.w-encoding.s
@@ -1,12 +1,9 @@
-// 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:
- b.w bar
+@ RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-LE
+@ RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-BE
+
+b.w bar
+@ CHECK-LE: b.w bar @ encoding: [A,0xf0'A',A,0x90'A']
+@ CHECK-LE-NEXT: @ fixup A - offset: 0, value: bar, kind: fixup_t2_uncondbranch
+@ CHECK-BE: b.w bar @ encoding: [0xf0'A',A,0x90'A',A]
+@ CHECK-BE-NEXT: @ fixup A - offset: 0, value: bar, kind: fixup_t2_uncondbranch
-// CHECK-LE: Contents of section .text:
-// CHECK-LE-NEXT: 0000 fff7febf
-// CHECK-BE: Contents of section .text:
-// CHECK-BE-NEXT: 0000 f7ffbffe
diff --git a/test/MC/ARM/thumb2be-beq.w-encoding.s b/test/MC/ARM/thumb2be-beq.w-encoding.s
index 994e15b123..e39e541f69 100644
--- a/test/MC/ARM/thumb2be-beq.w-encoding.s
+++ b/test/MC/ARM/thumb2be-beq.w-encoding.s
@@ -1,12 +1,9 @@
-// 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
+@ RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-LE
+@ RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-BE
+
+beq.w bar
+@ CHECK-LE: beq.w bar @ encoding: [A,0xf0'A',A,0x80'A']
+@ CHECK-LE-NEXT: @ fixup A - offset: 0, value: bar, kind: fixup_t2_condbranch
+@ CHECK-BE: beq.w bar @ encoding: [0xf0'A',A,0x80'A',A]
+@ CHECK-BE-NEXT: @ fixup A - offset: 0, value: bar, kind: fixup_t2_condbranch
-// 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
index f879de77b2..cc6c04ef18 100644
--- a/test/MC/ARM/thumb2be-movt-encoding.s
+++ b/test/MC/ARM/thumb2be-movt-encoding.s
@@ -1,12 +1,9 @@
-// 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)
+@ RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-LE
+@ RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-BE
+
+movt r9, :upper16:(_bar)
+@ CHECK-LE: movt r9, :upper16:_bar @ encoding: [0xc0'A',0xf2'A',0b0000AAAA,0x09]
+@ CHECK-LE-NEXT: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_movt_hi16
+@ CHECK-BE: movt r9, :upper16:_bar @ encoding: [0xf2,0b1100AAAA,0x09'A',A]
+@ CHECK-BE-NEXT: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_movt_hi16
-// 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
index bc01d3e294..3bff457961 100644
--- a/test/MC/ARM/thumb2be-movw-encoding.s
+++ b/test/MC/ARM/thumb2be-movw-encoding.s
@@ -1,12 +1,9 @@
-// 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)
+@ RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-LE
+@ RUN: llvm-mc -triple=thumbebv7-none-linux-gnueabi -show-encoding < %s | FileCheck %s --check-prefix=CHECK-BE
+
+movw r9, :lower16:(_bar)
+@ CHECK-LE: movw r9, :lower16:_bar @ encoding: [0x40'A',0xf2'A',0b0000AAAA,0x09]
+@ CHECK-LE-NEXT: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_movw_lo16
+@ CHECK-BE: movw r9, :lower16:_bar @ encoding: [0xf2,0b0100AAAA,0x09'A',A]
+@ CHECK-BE-NEXT: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_movw_lo16
-// CHECK-LE: Contents of section .text:
-// CHECK-LE-NEXT: 0000 40f20009
-// CHECK-BE: Contents of section .text:
-// CHECK-BE-NEXT: 0000 f2400900