]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/mips: add Octeon LHUX instruction
authorJames Hilliard <james.hilliard1@gmail.com>
Fri, 8 May 2026 08:50:41 +0000 (10:50 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 21 May 2026 06:20:58 +0000 (08:20 +0200)
LHUX performs an indexed unsigned halfword load from base + index and
zero-extends the result into rd.

Add the decode entry and reuse the common indexed-load translator with
MO_UW.

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-12-philmd@linaro.org>

target/mips/tcg/octeon.decode
target/mips/tcg/octeon_translate.c

index efb1a48b38acd1b428dabf3c3eeeace20c69023f..8a755075e8e171b55eef9e02c68d564e0e817940 100644 (file)
@@ -48,6 +48,7 @@ SNEI         011100 rs:5 rt:5 imm:s10 101111 &cmpi
 @lx          ...... base:5 index:5 rd:5 ...... ..... &lx
 LWX          011111 ..... ..... ..... 00000 001010 @lx
 LHX          011111 ..... ..... ..... 00100 001010 @lx
+LHUX         011111 ..... ..... ..... 10100 001010 @lx
 LBUX         011111 ..... ..... ..... 00110 001010 @lx
 LBX          011111 ..... ..... ..... 10110 001010 @lx
 LDX          011111 ..... ..... ..... 01000 001010 @lx
index 451737cda1d71c2f356be2a40fb426771c71b81c..f897b42807bc1eceff3e4edda023875fa5c01314 100644 (file)
@@ -164,5 +164,6 @@ static bool trans_lx(DisasContext *ctx, arg_lx *a, MemOp mop)
 TRANS(LBX,  trans_lx, MO_SB);
 TRANS(LBUX, trans_lx, MO_UB);
 TRANS(LHX,  trans_lx, MO_SW);
+TRANS(LHUX, trans_lx, MO_UW);
 TRANS(LWX,  trans_lx, MO_SL);
 TRANS(LDX,  trans_lx, MO_UQ);