Skip to contentSkip to conversation

Minor mips-related patchlet

PATCH In review Thiemo Seufer 2 participants 4 messages Feb 15, 2006 – Mar 13, 2006

lore
Share & tools
lore
#0 lore raw

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
diff -u -p -r1.2 op_mem.c
@@ -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
diff -u -p -r1.1 op_template.c
@@ -48,6 +48,12 @@ void glue(op_load_gpr_T2_gpr, REG) (void
     T2 = env->gpr[REG];
     RETURN();
 }
+
+void glue(op_store_T2_gpr_gpr, REG) (void)
+{
+    env->gpr[REG] = T2;
+    RETURN();
+}
 #endif
 
 #if defined (TN)
#1 lore raw
Quoted 3 lines

Index: target-mips/op_mem.c
...
+extern void dump_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

#2 lore raw
Quoted 6 lines · Paul Brook
Quoted 3 lines

Index: target-mips/op_mem.c
...
+extern void dump_sc (void);

Having function prototypes in .c files is wrong. I added it to exec.h instead.

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

#3 lore raw
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