Skip to content

Commit 7da51cb

Browse files
committed
target/mips: Remove unused register from MSA 2R/2RF instruction format
Commits cbe50b9 ("target-mips: add MSA VEC/2R format instructions") and 3bdeb68 ("target-mips: add MSA 2RF format instructions") added the MSA 2R/2RF instructions. However these instructions don't use any target vector register, so remove the unused TCG temporaries. Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]>
1 parent 7230389 commit 7da51cb

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

target/mips/tcg/msa_translate.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,13 +1942,11 @@ static void gen_msa_2r(DisasContext *ctx)
19421942
{
19431943
#define MASK_MSA_2R(op) (MASK_MSA_MINOR(op) | (op & (0x1f << 21)) | \
19441944
(op & (0x7 << 18)))
1945-
uint8_t wt = (ctx->opcode >> 16) & 0x1f;
19461945
uint8_t ws = (ctx->opcode >> 11) & 0x1f;
19471946
uint8_t wd = (ctx->opcode >> 6) & 0x1f;
19481947
uint8_t df = (ctx->opcode >> 16) & 0x3;
19491948
TCGv_i32 twd = tcg_const_i32(wd);
19501949
TCGv_i32 tws = tcg_const_i32(ws);
1951-
TCGv_i32 twt = tcg_const_i32(wt);
19521950
TCGv_i32 tdf = tcg_const_i32(df);
19531951

19541952
switch (MASK_MSA_2R(ctx->opcode)) {
@@ -2018,21 +2016,18 @@ static void gen_msa_2r(DisasContext *ctx)
20182016

20192017
tcg_temp_free_i32(twd);
20202018
tcg_temp_free_i32(tws);
2021-
tcg_temp_free_i32(twt);
20222019
tcg_temp_free_i32(tdf);
20232020
}
20242021

20252022
static void gen_msa_2rf(DisasContext *ctx)
20262023
{
20272024
#define MASK_MSA_2RF(op) (MASK_MSA_MINOR(op) | (op & (0x1f << 21)) | \
20282025
(op & (0xf << 17)))
2029-
uint8_t wt = (ctx->opcode >> 16) & 0x1f;
20302026
uint8_t ws = (ctx->opcode >> 11) & 0x1f;
20312027
uint8_t wd = (ctx->opcode >> 6) & 0x1f;
20322028
uint8_t df = (ctx->opcode >> 16) & 0x1;
20332029
TCGv_i32 twd = tcg_const_i32(wd);
20342030
TCGv_i32 tws = tcg_const_i32(ws);
2035-
TCGv_i32 twt = tcg_const_i32(wt);
20362031
/* adjust df value for floating-point instruction */
20372032
TCGv_i32 tdf = tcg_const_i32(df + 2);
20382033

@@ -2089,7 +2084,6 @@ static void gen_msa_2rf(DisasContext *ctx)
20892084

20902085
tcg_temp_free_i32(twd);
20912086
tcg_temp_free_i32(tws);
2092-
tcg_temp_free_i32(twt);
20932087
tcg_temp_free_i32(tdf);
20942088
}
20952089

0 commit comments

Comments
 (0)