From a4ddc54ec1cd187c844ca631fe0315bf1d78e96f Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Tue, 2 May 2017 11:53:30 +0100 Subject: MIPS16/opcodes: Keep the LSB of PC-relative offsets in disassembly Correct the disassembly of the PC-relative immediate argument of the MIPS16 synthetic LA, LW, DLA and LD instructions and do not mask the LSB, which in this case is a part of the data address rather than the ISA bit and has to be fully presented. opcodes/ * mips-dis.c (print_insn_arg): Only clear the ISA bit for jumps and branches and not synthetic data instructions. binutils/ * testsuite/binutils-all/mips/mips16-undecoded.d: Adjust the disassembly of PC-relative LA and LW synthetic instructions. --- .../testsuite/binutils-all/mips/mips16-undecoded.d | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'binutils/testsuite') diff --git a/binutils/testsuite/binutils-all/mips/mips16-undecoded.d b/binutils/testsuite/binutils-all/mips/mips16-undecoded.d index 42a5cdf..b455419 100644 --- a/binutils/testsuite/binutils-all/mips/mips16-undecoded.d +++ b/binutils/testsuite/binutils-all/mips/mips16-undecoded.d @@ -11,11 +11,11 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> f008 0231 addiu v0,sp,16401 [0-9a-f]+ <[^>]*> f008 0251 addiu v0,sp,16401 [0-9a-f]+ <[^>]*> f008 0291 addiu v0,sp,16401 -[0-9a-f]+ <[^>]*> f008 0a11 la v0,00004024 -[0-9a-f]+ <[^>]*> f008 0a11 la v0,00004028 -[0-9a-f]+ <[^>]*> f008 0a31 la v0,0000402c -[0-9a-f]+ <[^>]*> f008 0a51 la v0,00004030 -[0-9a-f]+ <[^>]*> f008 0a91 la v0,00004034 +[0-9a-f]+ <[^>]*> f008 0a11 la v0,00004025 +[0-9a-f]+ <[^>]*> f008 0a11 la v0,00004029 +[0-9a-f]+ <[^>]*> f008 0a31 la v0,0000402d +[0-9a-f]+ <[^>]*> f008 0a51 la v0,00004031 +[0-9a-f]+ <[^>]*> f008 0a91 la v0,00004035 [0-9a-f]+ <[^>]*> f008 1011 b 0000804e [0-9a-f]+ <[^>]*> f008 1011 b 00008052 [0-9a-f]+ <[^>]*> f008 1031 b 00008056 @@ -64,11 +64,11 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> f008 9231 lw v0,16401\(sp\) [0-9a-f]+ <[^>]*> f008 9251 lw v0,16401\(sp\) [0-9a-f]+ <[^>]*> f008 9291 lw v0,16401\(sp\) -[0-9a-f]+ <[^>]*> f008 b211 lw v0,000040f8 -[0-9a-f]+ <[^>]*> f008 b211 lw v0,000040fc -[0-9a-f]+ <[^>]*> f008 b231 lw v0,00004100 -[0-9a-f]+ <[^>]*> f008 b251 lw v0,00004104 -[0-9a-f]+ <[^>]*> f008 b291 lw v0,00004108 +[0-9a-f]+ <[^>]*> f008 b211 lw v0,000040f9 +[0-9a-f]+ <[^>]*> f008 b211 lw v0,000040fd +[0-9a-f]+ <[^>]*> f008 b231 lw v0,00004101 +[0-9a-f]+ <[^>]*> f008 b251 lw v0,00004105 +[0-9a-f]+ <[^>]*> f008 b291 lw v0,00004109 [0-9a-f]+ <[^>]*> f008 d211 sw v0,16401\(sp\) [0-9a-f]+ <[^>]*> f008 d211 sw v0,16401\(sp\) [0-9a-f]+ <[^>]*> f008 d231 sw v0,16401\(sp\) -- cgit v1.1