aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@orcam.me.uk>2025-07-06 19:22:49 +0100
committerMaciej W. Rozycki <macro@orcam.me.uk>2025-07-06 19:22:49 +0100
commit293e937452b8846ffab2782438ede1a01b9304b9 (patch)
tree45da04aa698d11096aa53f6360b6b3cc32e16d1c
parent51309ac47b9fe26545c39a8e8844af3c4d35b036 (diff)
downloadbinutils-293e937452b8846ffab2782438ede1a01b9304b9.zip
binutils-293e937452b8846ffab2782438ede1a01b9304b9.tar.gz
binutils-293e937452b8846ffab2782438ede1a01b9304b9.tar.bz2
MIPS/testsuite: Fix %hi usage across MIPS16 GAS/LD tests
Fix a couple of places in MIPS GAS and LD R_MIPS16_HI16/R_MIPS16_LO16 relocation tests where the %hi operator has been incorrectly used, but the %lo operator is expected to complement the preceding %hi operation.
-rw-r--r--gas/testsuite/gas/mips/mips16-hilo-n32.d4
-rw-r--r--gas/testsuite/gas/mips/mips16-hilo.d6
-rw-r--r--gas/testsuite/gas/mips/mips16-hilo.s6
-rw-r--r--gas/testsuite/gas/mips/mips16e2-hilo-n32.d4
-rw-r--r--gas/testsuite/gas/mips/mips16e2-hilo.d6
-rw-r--r--gas/testsuite/gas/mips/mips16e2-hilo.s6
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-hilo.d4
7 files changed, 18 insertions, 18 deletions
diff --git a/gas/testsuite/gas/mips/mips16-hilo-n32.d b/gas/testsuite/gas/mips/mips16-hilo-n32.d
index 5ac680d..7d78664 100644
--- a/gas/testsuite/gas/mips/mips16-hilo-n32.d
+++ b/gas/testsuite/gas/mips/mips16-hilo-n32.d
@@ -273,12 +273,12 @@ Disassembly of section \.text:
27e: R_MIPS16_HI16 \.data
282: f400 35a0 sll a1,16
286: f000 9d80 lw a0,0\(a1\)
- 286: R_MIPS16_HI16 \.data
+ 286: R_MIPS16_LO16 \.data
28a: f000 6d00 li a1,0
28a: R_MIPS16_HI16 \.data\+0x4
28e: f400 35a0 sll a1,16
292: f000 9d80 lw a0,0\(a1\)
- 292: R_MIPS16_HI16 \.data\+0x4
+ 292: R_MIPS16_LO16 \.data\+0x4
296: f000 6d00 li a1,0
296: R_MIPS16_HI16 big_external_data_label
29a: f400 35a0 sll a1,16
diff --git a/gas/testsuite/gas/mips/mips16-hilo.d b/gas/testsuite/gas/mips/mips16-hilo.d
index 081993a..5ecc928 100644
--- a/gas/testsuite/gas/mips/mips16-hilo.d
+++ b/gas/testsuite/gas/mips/mips16-hilo.d
@@ -273,12 +273,12 @@ Disassembly of section \.text:
27e: R_MIPS16_HI16 \.data
282: f400 35a0 sll a1,16
286: f000 9d80 lw a0,0\(a1\)
- 286: R_MIPS16_HI16 \.data
+ 286: R_MIPS16_LO16 \.data
28a: f000 6d00 li a1,0
28a: R_MIPS16_HI16 \.data
28e: f400 35a0 sll a1,16
- 292: f000 9d80 lw a0,0\(a1\)
- 292: R_MIPS16_HI16 \.data
+ 292: f000 9d84 lw a0,4\(a1\)
+ 292: R_MIPS16_LO16 \.data
296: f000 6d00 li a1,0
296: R_MIPS16_HI16 big_external_data_label
29a: f400 35a0 sll a1,16
diff --git a/gas/testsuite/gas/mips/mips16-hilo.s b/gas/testsuite/gas/mips/mips16-hilo.s
index cc1e8a0..b61b6b5 100644
--- a/gas/testsuite/gas/mips/mips16-hilo.s
+++ b/gas/testsuite/gas/mips/mips16-hilo.s
@@ -181,13 +181,13 @@ stuff:
addiu $4,%lo(small_local_common+0x1a5a5)
li $5,%hi(0)
sll $5,16
- lw $4,%hi(0)($5)
+ lw $4,%lo(0)($5)
li $5,%hi(data_label)
sll $5,16
- lw $4,%hi(data_label)($5)
+ lw $4,%lo(data_label)($5)
li $5,%hi(data_label2)
sll $5,16
- lw $4,%hi(data_label2)($5)
+ lw $4,%lo(data_label2)($5)
li $5,%hi(big_external_data_label)
sll $5,16
lw $4,%lo(big_external_data_label)($5)
diff --git a/gas/testsuite/gas/mips/mips16e2-hilo-n32.d b/gas/testsuite/gas/mips/mips16e2-hilo-n32.d
index b5df2b9..21a5836 100644
--- a/gas/testsuite/gas/mips/mips16e2-hilo-n32.d
+++ b/gas/testsuite/gas/mips/mips16e2-hilo-n32.d
@@ -217,11 +217,11 @@ Disassembly of section \.text:
[ ]*[0-9a-f]+: f000 6d20 lui a1,0x0
[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data
[ ]*[0-9a-f]+: f000 9d80 lw a0,0\(a1\)
-[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data
+[ ]*[0-9a-f]+: R_MIPS16_LO16 \.data
[ ]*[0-9a-f]+: f000 6d20 lui a1,0x0
[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data\+0x4
[ ]*[0-9a-f]+: f000 9d80 lw a0,0\(a1\)
-[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data\+0x4
+[ ]*[0-9a-f]+: R_MIPS16_LO16 \.data\+0x4
[ ]*[0-9a-f]+: f000 6d20 lui a1,0x0
[ ]*[0-9a-f]+: R_MIPS16_HI16 big_external_data_label
[ ]*[0-9a-f]+: f000 9d80 lw a0,0\(a1\)
diff --git a/gas/testsuite/gas/mips/mips16e2-hilo.d b/gas/testsuite/gas/mips/mips16e2-hilo.d
index 49dca2d..0591a5d 100644
--- a/gas/testsuite/gas/mips/mips16e2-hilo.d
+++ b/gas/testsuite/gas/mips/mips16e2-hilo.d
@@ -217,11 +217,11 @@ Disassembly of section \.text:
[ ]*[0-9a-f]+: f000 6d20 lui a1,0x0
[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data
[ ]*[0-9a-f]+: f000 9d80 lw a0,0\(a1\)
-[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data
+[ ]*[0-9a-f]+: R_MIPS16_LO16 \.data
[ ]*[0-9a-f]+: f000 6d20 lui a1,0x0
[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data
-[ ]*[0-9a-f]+: f000 9d80 lw a0,0\(a1\)
-[ ]*[0-9a-f]+: R_MIPS16_HI16 \.data
+[ ]*[0-9a-f]+: f000 9d84 lw a0,4\(a1\)
+[ ]*[0-9a-f]+: R_MIPS16_LO16 \.data
[ ]*[0-9a-f]+: f000 6d20 lui a1,0x0
[ ]*[0-9a-f]+: R_MIPS16_HI16 big_external_data_label
[ ]*[0-9a-f]+: f000 9d80 lw a0,0\(a1\)
diff --git a/gas/testsuite/gas/mips/mips16e2-hilo.s b/gas/testsuite/gas/mips/mips16e2-hilo.s
index f16a354..0efee2d 100644
--- a/gas/testsuite/gas/mips/mips16e2-hilo.s
+++ b/gas/testsuite/gas/mips/mips16e2-hilo.s
@@ -126,11 +126,11 @@ stuff:
lui $4,%hi(small_local_common+0x1a5a5)
addiu $4,%lo(small_local_common+0x1a5a5)
lui $5,%hi(0)
- lw $4,%hi(0)($5)
+ lw $4,%lo(0)($5)
lui $5,%hi(data_label)
- lw $4,%hi(data_label)($5)
+ lw $4,%lo(data_label)($5)
lui $5,%hi(data_label2)
- lw $4,%hi(data_label2)($5)
+ lw $4,%lo(data_label2)($5)
lui $5,%hi(big_external_data_label)
lw $4,%lo(big_external_data_label)($5)
lui $5,%hi(small_external_data_label)
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo.d b/ld/testsuite/ld-mips-elf/mips16-hilo.d
index 6871f8a..dfa840c 100644
--- a/ld/testsuite/ld-mips-elf/mips16-hilo.d
+++ b/ld/testsuite/ld-mips-elf/mips16-hilo.d
@@ -177,10 +177,10 @@ Disassembly of section .text:
0+50027c <[^>]*> 9d80 lw a0,0\(a1\)
0+50027e <[^>]*> f060 6d05 li a1,101
0+500282 <[^>]*> f400 35a0 sll a1,16
-0+500286 <[^>]*> f060 9d85 lw a0,101\(a1\)
+0+500286 <[^>]*> f328 9d80 lw a0,17184\(a1\)
0+50028a <[^>]*> f060 6d05 li a1,101
0+50028e <[^>]*> f400 35a0 sll a1,16
-0+500292 <[^>]*> f060 9d85 lw a0,101\(a1\)
+0+500292 <[^>]*> f328 9d84 lw a0,17188\(a1\)
0+500296 <[^>]*> f060 6d05 li a1,101
0+50029a <[^>]*> f400 35a0 sll a1,16
0+50029e <[^>]*> f328 9d90 lw a0,17200\(a1\)