Minor mips-related patchlet
PATCH 1/1 Minor mips-related patchlet
Hello All,
this adds a missing prototype and a store function template which is apparently unused but looks like a good thing to have around (other ports have it).
Thiemo
Index: target-mips/op_mem.c
===================================================================
RCS file: /sources/qemu/qemu/target-mips/op_mem.c,v retrieving revision 1.2
op_mem.c +2 -0
@@ -107,6 +107,8 @@ void glue(op_ll, MEMSUFFIX) (void)RETURN (); } +extern void dump_sc (void ); +void glue (op_sc ,MEMSUFFIX ) (void ) {CALL_FROM_TB0 (dump_sc);
Index: target-mips/op_template.c
===================================================================
RCS file: /sources/qemu/qemu/target-mips/op_template.c,v retrieving revision 1.1
op_template.c +6 -0
@@ -48,6 +48,12 @@ void glue(op_load_gpr_T2_gpr, REG) (voidT2 = env->gpr[REG ]; RETURN(); } + +void glue (op_store_T2_gpr_gpr ,REG ) (void ) +{ + env->gpr[REG ] =T2 ; +RETURN (); +}#endif #if defined (TN )
Quoted 3 lines
Index:
target-mips/op_mem.c
...
+extern voiddump_sc(void);
Having function prototypes in .c files is wrong. I added it to exec.h instead.
op_template.c void glue(op_load_gpr_T2_gpr, REG) (void · line 56
Quoted 5 lines
op_template.c +5
-0+void glue (op_store_T2_gpr_gpr ,REG ) (void ) +{ + env->gpr[REG ] =T2 ; +RETURN (); +}
I don't think there's any point adding this unless it's actually used. The ARM target doesn't have this op either.
Paul
Quoted 6 lines · Paul Brook
Quoted 3 lines
Index:
target-mips/op_mem.c
...
+extern voiddump_sc(void);Having function prototypes in .c files is wrong. I added it to
exec.hinstead.
Quoted 8 lines
op_template.c void glue(op_load_gpr_T2_gpr, REG) (void · line 56
Quoted 5 lines
op_template.c +5
-0+void glue (op_store_T2_gpr_gpr ,REG ) (void ) +{ + env->gpr[REG ] =T2 ; +RETURN (); +}I don't think there's any point adding this unless it's actually used. The ARM target doesn't have this op either.
Should it then be removed for other targets where it presumably isn't used as well?
Thiemo
Quoted 11 lines
Quoted 8 lines
op_template.c void glue(op_load_gpr_T2_gpr, REG) (void · line 56
Quoted 5 lines
op_template.c +5
-0+void glue (op_store_T2_gpr_gpr ,REG ) (void ) +{ + env->gpr[REG ] =T2 ; +RETURN (); +}I don't think there's any point adding this unless it's actually used. The ARM target doesn't have this op either.
Should it then be removed for other targets where it presumably isn't used as well?
A quick check indicates sparc and i386 use this instruction, mips and arm don't have it, and ppc could probably remove it.
Paul