target/mips: add Octeon LBX instruction
LBX performs an indexed signed byte load from base + index and writes the sign-extended result to rd. Wire the existing indexed-load helper to MO_SB so Octeon user-mode binaries can use the signed byte variant alongside the existing LBUX path. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20260520172313.23777-11-philmd@linaro.org>
James Hilliard committed
May 8, 2026 at 10:50 UTC
0950595f4318dc38093f5e4f6e9a454727350ef0
2 files changed
+2
target/mips/tcg/octeon.decode
+1
@@ -49,4 +49,5 @@ SNEI 011100 rs:5 rt:5 imm:s10 101111 &cmpi
49
LWX 011111 ..... ..... ..... 00000 001010 @lx
50
LHX 011111 ..... ..... ..... 00100 001010 @lx
51
LBUX 011111 ..... ..... ..... 00110 001010 @lx
52
+LBX 011111 ..... ..... ..... 10110 001010 @lx
53
LDX 011111 ..... ..... ..... 01000 001010 @lx
target/mips/tcg/octeon_translate.c
+1
@@ -161,6 +161,7 @@ static bool trans_lx(DisasContext *ctx, arg_lx *a, MemOp mop)
161
return true;
162
}
163
164
+TRANS(LBX, trans_lx, MO_SB);
165
TRANS(LBUX, trans_lx, MO_UB);
166
TRANS(LHX, trans_lx, MO_SW);
167
TRANS(LWX, trans_lx, MO_SL);