target/mips: Fixes for 4.1 rc1
v2 cover target/mips: Fixes for 4.1 rc1
From: Aleksandar Markovic <[email protected]>
At the moment, this includes fixes for problems in switch statements found by GCC 8.3 improved code analysis features.
v1->v2:
- excluded the patch on "ucontext" that will go into linux user queue
Aleksandar Markovic (4):
target/mips: Add 'fall through' comments for handling nanoMips' SHXS,
SWXS
target/mips: Add missing 'break' for a case of MTHC0 handling target/mips: Add missing 'break' for certain cases of MFTR handling target/mips: Add missing 'break' for certain cases of MTTR handling
target/mips/translate.c | 7 +++++++ 1 file changed, 7 insertions(+)
Signature · 1 line
2.7.4
PATCH v2 1/4 target/mips: Add 'fall through' comments for handling nanoMips' SHXS, SWXS
From: Aleksandar Markovic <[email protected]>
This was found by GCC 8.3 static analysis.
--- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)
target/mips/translate.c +2 -0
@@ -20136,12 +20136,14 @@ static void gen_p_lsx(DisasContext *ctx, int rd, int rs, int rt)switch (extract32 (ctx->opcode,7 ,4 )) {case NM_SHXS :check_nms (ctx); +/* fall through */ case NM_LHXS :case NM_LHUXS :tcg_gen_shli_tl (t0, t0,1 );break ;case NM_SWXS :check_nms (ctx); +/* fall through */ case NM_LWXS :case NM_LWC1XS :case NM_SWC1XS :
Signature · 1 line
2.7.4
PATCH v2 2/4 target/mips: Add missing 'break' for a case of MTHC0 handling
In reply to Aleksandar MarkovicFrom: Aleksandar Markovic <[email protected]>
This was found by GCC 8.3 static analysis.
--- target/mips/translate.c | 1 + 1 file changed, 1 insertion(+)
target/mips/translate.c +1 -0
@@ -6745,6 +6745,7 @@ static void gen_mthc0(DisasContext *ctx, TCGv arg, int reg, int sel)default : goto cp0_unimplemented; } +break ;case CP0_REGISTER_17 :switch (sel) {case 0 :
Signature · 1 line
2.7.4
PATCH v2 3/4 target/mips: Add missing 'break' for certain cases of MFTR handling
In reply to Aleksandar MarkovicFrom: Aleksandar Markovic <[email protected]>
This was found by GCC 8.3 static analysis.
--- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)
target/mips/translate.c +2 -0
@@ -9826,6 +9826,7 @@ static void gen_mftr(CPUMIPSState *env, DisasContext *ctx, int rt, int rd,gen_mfc0 (ctx, t0, rt, sel);break ; } +break ;case 12 :switch (sel) {case 0 :
@@ -9835,6 +9836,7 @@ static void gen_mftr(CPUMIPSState *env, DisasContext *ctx, int rt, int rd,gen_mfc0 (ctx, t0, rt, sel);break ; } +break ;case 13 :switch (sel) {case 0 :
Signature · 1 line
2.7.4
PATCH v2 4/4 target/mips: Add missing 'break' for certain cases of MTTR handling
In reply to Aleksandar MarkovicFrom: Aleksandar Markovic <[email protected]>
This was found by GCC 8.3 static analysis.
--- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)
target/mips/translate.c +2 -0
@@ -10055,6 +10055,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext *ctx, int rd, int rt,gen_mtc0 (ctx, t0, rd, sel);break ; } +break ;case 12 :switch (sel) {case 0 :
@@ -10064,6 +10065,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext *ctx, int rd, int rt,gen_mtc0 (ctx, t0, rd, sel);break ; } +break ;case 13 :switch (sel) {case 0 :
Signature · 1 line
2.7.4