]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
none/tests/riscv64/testinst.h: Use lla instead of la in JMP_RANGE
authorMark Wielaard <mark@klomp.org>
Thu, 24 Apr 2025 01:11:26 +0000 (03:11 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 24 Apr 2025 01:11:30 +0000 (03:11 +0200)
la was fine when using binutils ld >= 2.43. But older (2.41 and 2.42)
binutils ld produced:

none/tests/riscv64/integer.c:81:(.text+0x22cd8): dangerous relocation:
The addend isn't allowed for R_RISCV_GOT_HI20

Using lla makes integer and compressed link with all binutils ld
versions.

none/tests/riscv64/testinst.h

index 2f087d8b71345e6a288109ce01cd99933f7a653b..7f577edc353f8a381177220bca1a27b65f8d5991 100644 (file)
@@ -403,7 +403,7 @@ static void show_block_diff(unsigned char* block1,
          ".endif;"                                                             \
          ".if \"" #rs1 "\" != \"unused\";"                                     \
          "sd " #rs1 ", 48(%[w]);"      /* Spill rs1. */                        \
-         "la " #rs1 ", " rs1_val ";"   /* Load the first input. */             \
+         "lla " #rs1 ", " rs1_val ";"   /* Load the first input. */            \
          ".endif;"                                                             \
          ".if \"" #rs2 "\" != \"unused\";"                                     \
          "sd " #rs2 ", 56(%[w]);"      /* Spill rs2. */                        \