tcg/mips: fix field extraction opcode

The "msb" argument should correspond to (len - 1).

Backports commit 2f5a5f5774d95baacf86c03aa8a77a2d0390f2b2 from qemu
This commit is contained in:
Aurelien Jarno 2018-03-02 15:12:07 -05:00 committed by Lioncash
parent 69116abafc
commit 00ebbae128
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -2108,11 +2108,11 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc,
args[3] + args[4] - 1, args[3]);
break;
case INDEX_op_extract_i32:
tcg_out_opc_bf(s, OPC_EXT, a0, a1, a2 + args[3] - 1, a2);
tcg_out_opc_bf(s, OPC_EXT, a0, a1, args[3] - 1, a2);
break;
case INDEX_op_extract_i64:
tcg_out_opc_bf64(s, OPC_DEXT, OPC_DEXTM, OPC_DEXTU, a0, a1,
a2 + args[3] - 1, a2);
args[3] - 1, a2);
break;
case INDEX_op_brcond_i32: