mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-16 11:05:54 +00:00
ffa3225e26
Add range checking for the immediate operand and handle the "mov" mnemonic choosing between encodings based on the value of the immediate. Add tests for fixups, encoding choice and values, and diagnostic for out of range values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135500 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
773 B
ArmAsm
18 lines
773 B
ArmAsm
@ RUN: llvm-mc -triple armv7-unknown-unknown %s --show-encoding > %t
|
|
@ RUN: FileCheck < %t %s
|
|
|
|
bl _printf
|
|
@ CHECK: bl _printf @ encoding: [A,A,A,0xeb]
|
|
@ CHECK: @ fixup A - offset: 0, value: _printf, kind: fixup_arm_uncondbranch
|
|
|
|
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
|
|
@ CHECK: movw r9, :lower16:_foo @ encoding: [A,0x90'A',0b0000AAAA,0xe3]
|
|
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
|
|
@ CHECK: movt r9, :upper16:_foo @ encoding: [A,0x90'A',0b0100AAAA,0xe3]
|
|
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movt_hi16
|