2011-07-19 21:13:28 +02:00
|
|
|
@ RUN: llvm-mc -triple armv7-unknown-unknown %s --show-encoding > %t
|
|
|
|
@ RUN: FileCheck < %t %s
|
2014-03-28 15:35:30 +01:00
|
|
|
@ RUN: llvm-mc -triple armebv7-unknown-unknown %s --show-encoding > %t
|
|
|
|
@ RUN: FileCheck --check-prefix=CHECK-BE < %t %s
|
2010-12-14 18:37:16 +01:00
|
|
|
|
2011-07-19 21:13:28 +02:00
|
|
|
bl _printf
|
|
|
|
@ CHECK: bl _printf @ encoding: [A,A,A,0xeb]
|
2012-03-30 11:15:32 +02:00
|
|
|
@ CHECK: @ fixup A - offset: 0, value: _printf, kind: fixup_arm_uncondbl
|
2014-03-28 15:35:30 +01:00
|
|
|
@ CHECK-BE: bl _printf @ encoding: [0xeb,A,A,A]
|
|
|
|
@ CHECK-BE: @ fixup A - offset: 0, value: _printf, kind: fixup_arm_uncondbl
|
2011-07-19 21:02:39 +02:00
|
|
|
|
2011-07-19 21:13:28 +02:00
|
|
|
mov r9, :lower16:(_foo)
|
|
|
|
movw r9, :lower16:(_foo)
|
|
|
|
movt r9, :upper16:(_foo)
|
|
|
|
|
|
|
|
@ CHECK: movw r9, :lower16:_foo @ encoding: [A,0x90'A',0b0000AAAA,0xe3]
|
|
|
|
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
|
2014-03-28 15:35:30 +01:00
|
|
|
@ CHECK-BE: movw r9, :lower16:_foo @ encoding: [0xe3,0b0000AAAA,0x90'A',A]
|
|
|
|
@ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
|
2011-07-19 21:13:28 +02:00
|
|
|
@ CHECK: movw r9, :lower16:_foo @ encoding: [A,0x90'A',0b0000AAAA,0xe3]
|
|
|
|
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
|
2014-03-28 15:35:30 +01:00
|
|
|
@ CHECK-BE: movw r9, :lower16:_foo @ encoding: [0xe3,0b0000AAAA,0x90'A',A]
|
|
|
|
@ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
|
2011-07-19 21:13:28 +02:00
|
|
|
@ CHECK: movt r9, :upper16:_foo @ encoding: [A,0x90'A',0b0100AAAA,0xe3]
|
|
|
|
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movt_hi16
|
2014-03-28 15:35:30 +01:00
|
|
|
@ CHECK-BE: movt r9, :upper16:_foo @ encoding: [0xe3,0b0100AAAA,0x90'A',A]
|
|
|
|
@ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movt_hi16
|
2012-05-01 22:43:21 +02:00
|
|
|
|
2014-04-19 01:06:39 +02:00
|
|
|
mov r2, :lower16:fred
|
2012-05-01 22:43:21 +02:00
|
|
|
|
2014-04-19 01:06:39 +02:00
|
|
|
@ CHECK: movw r2, :lower16:fred @ encoding: [A,0x20'A',0b0000AAAA,0xe3]
|
2012-05-01 22:43:21 +02:00
|
|
|
@ CHECK: @ fixup A - offset: 0, value: fred, kind: fixup_arm_movw_lo16
|
2014-04-19 01:06:39 +02:00
|
|
|
@ CHECK-BE: movw r2, :lower16:fred @ encoding: [0xe3,0b0000AAAA,0x20'A',A]
|
2014-03-28 15:35:30 +01:00
|
|
|
@ CHECK-BE: @ fixup A - offset: 0, value: fred, kind: fixup_arm_movw_lo16
|