mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
a147209ed5
This needed two fixes: * 32-bit instructions were read in the wrong order. The machine code swaps the two 16-bit instruction words, which wasn't undone when decoding instructions. * Jump and call instructions don't encode the lowest address bit, which is always zero. Therefore, the address needed to be shifted by one to fix that. Differential Revision: https://reviews.llvm.org/D81961
22 lines
655 B
ArmAsm
22 lines
655 B
ArmAsm
; RUN: llvm-mc -triple avr -mattr=jmpcall -show-encoding < %s | FileCheck %s
|
|
; RUN: llvm-mc -filetype=obj -triple avr -mattr=jmpcall < %s | llvm-objdump -dr --mattr=jmpcall - | FileCheck -check-prefix=CHECK-INST %s
|
|
|
|
|
|
foo:
|
|
|
|
call 4096
|
|
call -124
|
|
call -12
|
|
call 0
|
|
|
|
; CHECK: call 4096 ; encoding: [0x0e,0x94,0x00,0x08]
|
|
; CHECK: call -124 ; encoding: [0xff,0x95,0xc2,0xff]
|
|
; CHECK: call -12 ; encoding: [0xff,0x95,0xfa,0xff]
|
|
; CHECK: call 0 ; encoding: [0x0e,0x94,0x00,0x00]
|
|
|
|
|
|
; CHECK-INST: call 4096
|
|
; CHECK-INST: call 8388484
|
|
; CHECK-INST: call 8388596
|
|
; CHECK-INST: call 0
|