Skip to contentSkip to conversation

target/mips: remove commented out codes in translate.c

PATCH In review Jiang Biao 3 participants 5 messages Sep 29, 2017 – Sep 30, 2017

lore
Share & tools
lore

Jiang Biao

author
#0 lore raw

PATCH 1/1 target/mips: remove commented out codes in translate.c

---
 target/mips/translate.c | 48 ------------------------------------------------
 1 file changed, 48 deletions(-)
target/mips/translate.c +0 -48
index 559f8fe..7c102a4 100644
@@ -5133,7 +5133,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//            gen_helper_mfc0_contextconfig(arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -5455,19 +5454,15 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_mfc0_tracecontrol(arg); /* PDtrace support */
             rn = "TraceControl";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mfc0_tracecontrol2(arg); /* PDtrace support */
             rn = "TraceControl2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mfc0_usertracedata(arg); /* PDtrace support */
             rn = "UserTraceData";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mfc0_tracebpc(arg); /* PDtrace support */
             rn = "TraceBPC";
             goto cp0_unimplemented;
         default:
@@ -5493,31 +5488,24 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_mfc0_performance1(arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mfc0_performance2(arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mfc0_performance3(arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mfc0_performance4(arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_mfc0_performance5(arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_mfc0_performance6(arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_mfc0_performance7(arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
@@ -5785,7 +5773,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//            gen_helper_mtc0_contextconfig(cpu_env, arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -6110,13 +6097,11 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_mtc0_tracecontrol(cpu_env, arg); /* PDtrace support */
             rn = "TraceControl";
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */
             rn = "TraceControl2";
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
@@ -6124,13 +6109,11 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
         case 3:
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
-//            gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */
             rn = "UserTraceData";
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceBPC";
@@ -6157,31 +6140,24 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_mtc0_performance1(arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_performance2(arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mtc0_performance3(arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_performance4(arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_mtc0_performance5(arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_mtc0_performance6(arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_mtc0_performance7(arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
@@ -6447,7 +6423,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//            gen_helper_dmfc0_contextconfig(arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -6762,19 +6737,15 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_dmfc0_tracecontrol(arg, cpu_env); /* PDtrace support */
             rn = "TraceControl";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_dmfc0_tracecontrol2(arg, cpu_env); /* PDtrace support */
             rn = "TraceControl2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_dmfc0_usertracedata(arg, cpu_env); /* PDtrace support */
             rn = "UserTraceData";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_dmfc0_tracebpc(arg, cpu_env); /* PDtrace support */
             rn = "TraceBPC";
             goto cp0_unimplemented;
         default:
@@ -6799,31 +6770,24 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_dmfc0_performance1(arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_dmfc0_performance2(arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_dmfc0_performance3(arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_dmfc0_performance4(arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_dmfc0_performance5(arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_dmfc0_performance6(arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_dmfc0_performance7(arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
@@ -7083,7 +7047,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//           gen_helper_mtc0_contextconfig(cpu_env, arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -7410,25 +7373,21 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_mtc0_tracecontrol(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceControl";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceControl2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "UserTraceData";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceBPC";
@@ -7455,31 +7414,24 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_mtc0_performance1(cpu_env, arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_performance2(cpu_env, arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mtc0_performance3(cpu_env, arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_performance4(cpu_env, arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_mtc0_performance5(cpu_env, arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_mtc0_performance6(cpu_env, arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_mtc0_performance7(cpu_env, arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 254 lines · Jiang Biao
---
 target/mips/translate.c | 48 ------------------------------------------------
 1 file changed, 48 deletions(-)
target/mips/translate.c +0 -46
index 559f8fe..7c102a4 100644
@@ -5133,7 +5133,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//            gen_helper_mfc0_contextconfig(arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -5455,19 +5454,15 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_mfc0_tracecontrol(arg); /* PDtrace support */
             rn = "TraceControl";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mfc0_tracecontrol2(arg); /* PDtrace support */
             rn = "TraceControl2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mfc0_usertracedata(arg); /* PDtrace support */
             rn = "UserTraceData";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mfc0_tracebpc(arg); /* PDtrace support */
             rn = "TraceBPC";
             goto cp0_unimplemented;
         default:
@@ -5493,31 +5488,24 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_mfc0_performance1(arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mfc0_performance2(arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mfc0_performance3(arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mfc0_performance4(arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_mfc0_performance5(arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_mfc0_performance6(arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_mfc0_performance7(arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
@@ -5785,7 +5773,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//            gen_helper_mtc0_contextconfig(cpu_env, arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -6110,13 +6097,11 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_mtc0_tracecontrol(cpu_env, arg); /* PDtrace support */
             rn = "TraceControl";
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */
             rn = "TraceControl2";
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
@@ -6124,13 +6109,11 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
         case 3:
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
-//            gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */
             rn = "UserTraceData";
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceBPC";
@@ -6157,31 +6140,24 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_mtc0_performance1(arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_performance2(arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mtc0_performance3(arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_performance4(arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_mtc0_performance5(arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_mtc0_performance6(arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_mtc0_performance7(arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
@@ -6447,7 +6423,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//            gen_helper_dmfc0_contextconfig(arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -6762,19 +6737,15 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_dmfc0_tracecontrol(arg, cpu_env); /* PDtrace support */
             rn = "TraceControl";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_dmfc0_tracecontrol2(arg, cpu_env); /* PDtrace support */
             rn = "TraceControl2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_dmfc0_usertracedata(arg, cpu_env); /* PDtrace support */
             rn = "UserTraceData";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_dmfc0_tracebpc(arg, cpu_env); /* PDtrace support */
             rn = "TraceBPC";
             goto cp0_unimplemented;
         default:
@@ -6799,31 +6770,24 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_dmfc0_performance1(arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_dmfc0_performance2(arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_dmfc0_performance3(arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_dmfc0_performance4(arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_dmfc0_performance5(arg);
             rn = "Performance5";
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_dmfc0_performance6(arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_dmfc0_performance7(arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:
@@ -7083,7 +7047,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Context";
             break;
         case 1:
-//           gen_helper_mtc0_contextconfig(cpu_env, arg); /* SmartMIPS ASE */
             rn = "ContextConfig";
             goto cp0_unimplemented;
         case 2:
@@ -7410,25 +7373,21 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Debug";
             break;
         case 1:
-//            gen_helper_mtc0_tracecontrol(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceControl";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceControl2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "UserTraceData";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */
             /* Stop translation as we may have switched the execution mode */
             ctx->bstate = BS_STOP;
             rn = "TraceBPC";
@@ -7455,31 +7414,24 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
             rn = "Performance0";
             break;
         case 1:
-//            gen_helper_mtc0_performance1(cpu_env, arg);
             rn = "Performance1";
             goto cp0_unimplemented;
         case 2:
-//            gen_helper_mtc0_performance2(cpu_env, arg);
             rn = "Performance2";
             goto cp0_unimplemented;
         case 3:
-//            gen_helper_mtc0_performance3(cpu_env, arg);
             rn = "Performance3";
             goto cp0_unimplemented;
         case 4:
-//            gen_helper_mtc0_performance4(cpu_env, arg);
             rn = "Performance4";
             goto cp0_unimplemented;
         case 5:
-//            gen_helper_mtc0_performance5(cpu_env, arg);
             rn = "Performance5";

target/mips/translate.c static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) · line 7437

Quoted 10 lines
target/mips/translate.c +0 -2
             goto cp0_unimplemented;
         case 6:
-//            gen_helper_mtc0_performance6(cpu_env, arg);
             rn = "Performance6";
             goto cp0_unimplemented;
         case 7:
-//            gen_helper_mtc0_performance7(cpu_env, arg);
             rn = "Performance7";
             goto cp0_unimplemented;
         default:

Regards,
Yongbok

#2 lore raw
In reply to Jiang Biao

Hi Jiang,

I'm not sure it is really helpful to remove those comment, they are here as debt to the project, reminding what should be implemented.

Are you proposing to accept this instructions will never get implemented?

Regards,

Phil.

Quoted 264 lines · Jiang Biao
---
  target/mips/translate.c | 48 ------------------------------------------------
  1 file changed, 48 deletions(-)
target/mips/translate.c +0 -48
index 559f8fe..7c102a4 100644
@@ -5133,7 +5133,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Context";
              break;
          case 1:
-//            gen_helper_mfc0_contextconfig(arg); /* SmartMIPS ASE */
              rn = "ContextConfig";
              goto cp0_unimplemented;
          case 2:
@@ -5455,19 +5454,15 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Debug";
              break;
          case 1:
-//            gen_helper_mfc0_tracecontrol(arg); /* PDtrace support */
              rn = "TraceControl";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_mfc0_tracecontrol2(arg); /* PDtrace support */
              rn = "TraceControl2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_mfc0_usertracedata(arg); /* PDtrace support */
              rn = "UserTraceData";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_mfc0_tracebpc(arg); /* PDtrace support */
              rn = "TraceBPC";
              goto cp0_unimplemented;
          default:
@@ -5493,31 +5488,24 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Performance0";
              break;
          case 1:
-//            gen_helper_mfc0_performance1(arg);
              rn = "Performance1";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_mfc0_performance2(arg);
              rn = "Performance2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_mfc0_performance3(arg);
              rn = "Performance3";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_mfc0_performance4(arg);
              rn = "Performance4";
              goto cp0_unimplemented;
          case 5:
-//            gen_helper_mfc0_performance5(arg);
              rn = "Performance5";
              goto cp0_unimplemented;
          case 6:
-//            gen_helper_mfc0_performance6(arg);
              rn = "Performance6";
              goto cp0_unimplemented;
          case 7:
-//            gen_helper_mfc0_performance7(arg);
              rn = "Performance7";
              goto cp0_unimplemented;
          default:
@@ -5785,7 +5773,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Context";
              break;
          case 1:
-//            gen_helper_mtc0_contextconfig(cpu_env, arg); /* SmartMIPS ASE */
              rn = "ContextConfig";
              goto cp0_unimplemented;
          case 2:
@@ -6110,13 +6097,11 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Debug";
              break;
          case 1:
-//            gen_helper_mtc0_tracecontrol(cpu_env, arg); /* PDtrace support */
              rn = "TraceControl";
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */
              rn = "TraceControl2";
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
@@ -6124,13 +6109,11 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
          case 3:
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
-//            gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */
              rn = "UserTraceData";
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              rn = "TraceBPC";
@@ -6157,31 +6140,24 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Performance0";
              break;
          case 1:
-//            gen_helper_mtc0_performance1(arg);
              rn = "Performance1";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_mtc0_performance2(arg);
              rn = "Performance2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_mtc0_performance3(arg);
              rn = "Performance3";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_mtc0_performance4(arg);
              rn = "Performance4";
              goto cp0_unimplemented;
          case 5:
-//            gen_helper_mtc0_performance5(arg);
              rn = "Performance5";
              goto cp0_unimplemented;
          case 6:
-//            gen_helper_mtc0_performance6(arg);
              rn = "Performance6";
              goto cp0_unimplemented;
          case 7:
-//            gen_helper_mtc0_performance7(arg);
              rn = "Performance7";
              goto cp0_unimplemented;
          default:
@@ -6447,7 +6423,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Context";
              break;
          case 1:
-//            gen_helper_dmfc0_contextconfig(arg); /* SmartMIPS ASE */
              rn = "ContextConfig";
              goto cp0_unimplemented;
          case 2:
@@ -6762,19 +6737,15 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Debug";
              break;
          case 1:
-//            gen_helper_dmfc0_tracecontrol(arg, cpu_env); /* PDtrace support */
              rn = "TraceControl";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_dmfc0_tracecontrol2(arg, cpu_env); /* PDtrace support */
              rn = "TraceControl2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_dmfc0_usertracedata(arg, cpu_env); /* PDtrace support */
              rn = "UserTraceData";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_dmfc0_tracebpc(arg, cpu_env); /* PDtrace support */
              rn = "TraceBPC";
              goto cp0_unimplemented;
          default:
@@ -6799,31 +6770,24 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Performance0";
              break;
          case 1:
-//            gen_helper_dmfc0_performance1(arg);
              rn = "Performance1";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_dmfc0_performance2(arg);
              rn = "Performance2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_dmfc0_performance3(arg);
              rn = "Performance3";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_dmfc0_performance4(arg);
              rn = "Performance4";
              goto cp0_unimplemented;
          case 5:
-//            gen_helper_dmfc0_performance5(arg);
              rn = "Performance5";
              goto cp0_unimplemented;
          case 6:
-//            gen_helper_dmfc0_performance6(arg);
              rn = "Performance6";
              goto cp0_unimplemented;
          case 7:
-//            gen_helper_dmfc0_performance7(arg);
              rn = "Performance7";
              goto cp0_unimplemented;
          default:
@@ -7083,7 +7047,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Context";
              break;
          case 1:
-//           gen_helper_mtc0_contextconfig(cpu_env, arg); /* SmartMIPS ASE */
              rn = "ContextConfig";
              goto cp0_unimplemented;
          case 2:
@@ -7410,25 +7373,21 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Debug";
              break;
          case 1:
-//            gen_helper_mtc0_tracecontrol(cpu_env, arg); /* PDtrace support */
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              rn = "TraceControl";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              rn = "TraceControl2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              rn = "UserTraceData";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */
              /* Stop translation as we may have switched the execution mode */
              ctx->bstate = BS_STOP;
              rn = "TraceBPC";
@@ -7455,31 +7414,24 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
              rn = "Performance0";
              break;
          case 1:
-//            gen_helper_mtc0_performance1(cpu_env, arg);
              rn = "Performance1";
              goto cp0_unimplemented;
          case 2:
-//            gen_helper_mtc0_performance2(cpu_env, arg);
              rn = "Performance2";
              goto cp0_unimplemented;
          case 3:
-//            gen_helper_mtc0_performance3(cpu_env, arg);
              rn = "Performance3";
              goto cp0_unimplemented;
          case 4:
-//            gen_helper_mtc0_performance4(cpu_env, arg);
              rn = "Performance4";
              goto cp0_unimplemented;
          case 5:
-//            gen_helper_mtc0_performance5(cpu_env, arg);
              rn = "Performance5";
              goto cp0_unimplemented;
          case 6:
-//            gen_helper_mtc0_performance6(cpu_env, arg);
              rn = "Performance6";
              goto cp0_unimplemented;
          case 7:
-//            gen_helper_mtc0_performance7(cpu_env, arg);
              rn = "Performance7";
              goto cp0_unimplemented;
          default:
#3 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé

Hi Jiang,

I'm not sure it is really helpful to remove those comment, they are here as debt to the project, reminding what should be implemented.

Are you proposing to accept this instructions will never get implemented?

Regards,

Phil.

Hi Phil,

The commented codes are all trivial. When the time we implement those features it is merely copy & paste from the specification. I don't think there is much harm to remove the comments.
Besides there is TODO file in the same directory but that has not been updated for a while, perhaps updating the file is much relevant with this patch.

Regards,
Yongbok

#4 lore raw

Re: [Qemu-devel] [PATCH] target/mips: remove commented out codes intranslate.c

Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 11 lines

Hi Jiang,

I'm not sure it is really helpful to remove those comment, they are here as debt to the project, reminding what should be implemented.

Are you proposing to accept this instructions will never get implemented?

Regards,

Phil.

Quoted 8 lines

Hi Phil,

The commented codes are all trivial. When the time we implement those features it is merely copy & paste from the specification. I don't think there is much harm to remove the comments.
Besides there is TODO file in the same directory but that has not been updated for a while, perhaps updating the file is much relevant with this patch.

Can't agree more :), it should be better put the reminder in other place

rather in release code.

Regards,

Jiang