[llvm] [Xtensa] Fix literal section emit for ConstantPool entries. (PR #200132)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 04:14:23 PDT 2026
================
@@ -0,0 +1,20 @@
+; RUN: llc -mtriple=xtensa -function-sections --mcpu=esp32 --filetype=obj < %s\
+; RUN: | llvm-objdump -r -s --triple=xtensa --mcpu=esp32 -\
+; RUN: | FileCheck %s
+
+; CHECK-LABEL: RELOCATION RECORDS FOR [.literal.func_b]:
+; CHECK: OFFSET TYPE VALUE
+; CHECK-NEXT: 00000000 R_XTENSA_32 func_a
+
+; CHECK-LABEL: Contents of section .literal.func_b:
+; CHECK: 0000 00000000 ....
----------------
andreisfr wrote:
For constant '42' we generate movi instruction (it is suitable for 12-bit signed immediates) like this:
...
movi a10, 42
callx8 a8
...
https://github.com/llvm/llvm-project/pull/200132
More information about the llvm-commits
mailing list