[llvm] [AVR] Fix parsing & emitting relative jumps (PR #102936)
Patryk Wychowaniec via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 02:33:14 PDT 2024
================
@@ -1,24 +1,25 @@
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
; RUN: llvm-mc -filetype=obj -triple avr < %s \
-; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s
+; RUN: | llvm-objdump -dr - | FileCheck --check-prefix=INST %s
foo:
-
brbc 3, .+8
brbc 0, .-16
.short 0xf759
.short 0xf752
.short 0xf74c
.short 0xf4c7
-; CHECK: brvc .Ltmp0+8 ; encoding: [0bAAAAA011,0b111101AA]
-; CHECK: ; fixup A - offset: 0, value: .Ltmp0+8, kind: fixup_7_pcrel
-; CHECK: brcc .Ltmp1-16 ; encoding: [0bAAAAA000,0b111101AA]
-; CHECK: ; fixup A - offset: 0, value: .Ltmp1-16, kind: fixup_7_pcrel
+; CHECK: brvc (.Ltmp0+8)+2 ; encoding: [0bAAAAA011,0b111101AA]
----------------
Patryk27 wrote:
I see, yes - we probably have to approach the problem differently, since treating `.` as `+2` leaks into the objdump's output.
We've already got this commit merged, but I'll prepare a better fix in the coming days.
https://github.com/llvm/llvm-project/pull/102936
More information about the llvm-commits
mailing list