]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips32: update clobbers in none/mips32/LoadStore tests
authorPetar Jovanovic <mips32r2@gmail.com>
Wed, 17 May 2017 15:35:48 +0000 (15:35 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Wed, 17 May 2017 15:35:48 +0000 (15:35 +0000)
Add missing registers to clobbers.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16395

none/tests/mips32/LoadStore.c
none/tests/mips32/LoadStore1.c

index 08bc41c87c5b70d86af905eb48cdb8dcfe9c70d2..38574ef028e89677a124150afededa40614ba5ad 100644 (file)
@@ -22,51 +22,52 @@ unsigned int mem2[] = {
 
 // sb $t0, 0($t1)
 #define TESTINST1(instruction, RTval, offset, RT, RS) \
-{ \
-    unsigned int out; \
-   __asm__ volatile( \
-     "move $" #RS", %1\n\t" \
-     "li $" #RT", " #RTval"\n\t" \
-     instruction "\n\t" \
-     "lw %0, "#offset"($"#RS")\n\t" \
-     : "=&r" (out) \
-        : "r" (mem1), "r" (RTval) \
-        : #RT, "cc", "memory" \
-        ); \
-   printf("%s :: RTval: 0x%x, out: 0x%x\n", \
-          instruction, RTval, out); \
-   out = 0; \
-   __asm__ volatile( \
-     "move $" #RS", %1\n\t" \
-     "li $" #RT", " #RTval"\n\t" \
-     instruction "\n\t" \
-     "lw %0, "#offset"($"#RS")\n\t" \
-     : "=&r" (out) \
-        : "r" (mem), "r" (RTval) \
-        : #RT, "cc", "memory" \
-        ); \
-   printf("%s :: RTval: 0x%x, out: 0x%x\n", \
-          instruction, RTval, out); \
+{                                                     \
+   unsigned int out;                                  \
+   __asm__ volatile(                                  \
+      "move $" #RS", %1                         \n\t" \
+      "li $" #RT", " #RTval"                    \n\t" \
+      instruction "                             \n\t" \
+      "lw %0, "#offset"($"#RS")                 \n\t" \
+      : "=&r" (out)                                   \
+      : "r" (mem1), "r" (RTval)                       \
+      : #RS, #RT, "memory"                            \
+   );                                                 \
+   printf("%s :: RTval: 0x%x, out: 0x%x\n",           \
+          instruction, RTval, out);                   \
+   out = 0;                                           \
+   __asm__ volatile(                                  \
+      "move $" #RS", %1                         \n\t" \
+      "li $" #RT", " #RTval "                   \n\t" \
+      instruction "                             \n\t" \
+      "lw %0, "#offset"($"#RS")                 \n\t" \
+      : "=&r" (out)                                   \
+      : "r" (mem), "r" (RTval)                        \
+      : #RS, #RT, "memory"                            \
+   );                                                 \
+   printf("%s :: RTval: 0x%x, out: 0x%x\n",           \
+          instruction, RTval, out);                   \
 }
 
 // swl $t0, 3($t1)
 // swr $t0, 0($t1)
-#define TESTINSTsw(RTval, offset, RT, RS) \
-{ \
-    unsigned int out; \
-   __asm__ volatile( \
-     "move $" #RS", %1\n\t" \
-     "addiu $"#RS", $"#RS", "#offset"\n\t" \
-     "li $" #RT", " #RTval"\n\t" \
-     "swl $t0, 3($t1) \n\t" \
-     "swr $t0, 0($t1) \n\t" \
-     "lw %0, 0($"#RS")\n\t" \
-     : "=&r" (out) \
-        : "r" (mem2), "r" (RTval) \
-        : #RT, #RS, "cc", "memory" \
-        ); \
-   printf("swl $t0, 3($t1)\nswr $t0, 0($t1)\n :: RTval: 0x%x, out: 0x%x\n", \
-          RTval, out); \
+#define TESTINSTsw(RTval, offset, RT, RS)             \
+{                                                     \
+   unsigned int out;                                  \
+   __asm__ volatile(                                  \
+      "move $" #RS", %1\n\t"                          \
+      "addiu $"#RS", $"#RS", "#offset"          \n\t" \
+      "li $" #RT", " #RTval"                    \n\t" \
+      "swl $t0, 3($t1)                          \n\t" \
+      "swr $t0, 0($t1)                          \n\t" \
+      "lw %0, 0($"#RS")                         \n\t" \
+      : "=&r" (out)                                   \
+      : "r" (mem2), "r" (RTval)                       \
+      : #RT, #RS, "memory"                            \
+   );                                                 \
+   printf("swl $t0, 3($t1)\nswr $t0, 0($t1)\n"        \
+          " :: RTval: 0x%x, out: 0x%x\n",             \
+          RTval, out);                                \
 }
 
 void ppMem(unsigned int* m, int len)
index a6547b2c474f728cc8e94a119b6427e2392d8b4c..6a54303226ae71482fb4b9ebc49e50ca482c95f7 100644 (file)
@@ -22,51 +22,52 @@ unsigned int mem2[] = {
 
 // sb $t0, 0($t1)
 #define TESTINST1(instruction, RTval, offset, RT, RS) \
-{ \
-    unsigned int out; \
-   __asm__ volatile( \
-     "move $" #RS", %1\n\t" \
-     "li $" #RT", " #RTval"\n\t" \
-     instruction "\n\t" \
-     "lw %0, "#offset"($"#RS")\n\t" \
-     : "=&r" (out) \
-        : "r" (mem1), "r" (RTval) \
-        : #RT, "cc", "memory" \
-        ); \
-   printf("%s :: RTval: 0x%x, out: 0x%x\n", \
-          instruction, RTval, out); \
-   out = 0; \
-   __asm__ volatile( \
-     "move $" #RS", %1\n\t" \
-     "li $" #RT", " #RTval"\n\t" \
-     instruction "\n\t" \
-     "lw %0, "#offset"($"#RS")\n\t" \
-     : "=&r" (out) \
-        : "r" (mem), "r" (RTval) \
-        : #RT, "cc", "memory" \
-        ); \
-   printf("%s :: RTval: 0x%x, out: 0x%x\n", \
-          instruction, RTval, out); \
+{                                                     \
+   unsigned int out;                                  \
+   __asm__ volatile(                                  \
+      "move $" #RS", %1                         \n\t" \
+      "li $" #RT", " #RTval"                    \n\t" \
+      instruction "                             \n\t" \
+      "lw %0, "#offset"($"#RS")                 \n\t" \
+      : "=&r" (out)                                   \
+      : "r" (mem1), "r" (RTval)                       \
+      : #RS, #RT, "memory"                            \
+   );                                                 \
+   printf("%s :: RTval: 0x%x, out: 0x%x\n",           \
+          instruction, RTval, out);                   \
+   out = 0;                                           \
+   __asm__ volatile(                                  \
+      "move $" #RS", %1                         \n\t" \
+      "li $" #RT", " #RTval "                   \n\t" \
+      instruction "                             \n\t" \
+      "lw %0, "#offset"($"#RS")                 \n\t" \
+      : "=&r" (out)                                   \
+      : "r" (mem), "r" (RTval)                        \
+      : #RS, #RT, "memory"                            \
+   );                                                 \
+   printf("%s :: RTval: 0x%x, out: 0x%x\n",           \
+          instruction, RTval, out);                   \
 }
 
 // swl $t0, 3($t1)
 // swr $t0, 0($t1)
-#define TESTINSTsw(RTval, offset, RT, RS) \
-{ \
-    unsigned int out; \
-   __asm__ volatile( \
-     "move $" #RS", %1\n\t" \
-     "addiu $"#RS", $"#RS", "#offset"\n\t" \
-     "li $" #RT", " #RTval"\n\t" \
-     "swl $t0, 3($t1) \n\t" \
-     "swr $t0, 0($t1) \n\t" \
-     "lw %0, 0($"#RS")\n\t" \
-     : "=&r" (out) \
-        : "r" (mem2), "r" (RTval) \
-        : #RT, #RS, "cc", "memory" \
-        ); \
-   printf("swl $t0, 3($t1)\nswr $t0, 0($t1)\n :: RTval: 0x%x, out: 0x%x\n", \
-          RTval, out); \
+#define TESTINSTsw(RTval, offset, RT, RS)             \
+{                                                     \
+   unsigned int out;                                  \
+   __asm__ volatile(                                  \
+      "move $" #RS", %1\n\t"                          \
+      "addiu $"#RS", $"#RS", "#offset"          \n\t" \
+      "li $" #RT", " #RTval"                    \n\t" \
+      "swl $t0, 3($t1)                          \n\t" \
+      "swr $t0, 0($t1)                          \n\t" \
+      "lw %0, 0($"#RS")                         \n\t" \
+      : "=&r" (out)                                   \
+      : "r" (mem2), "r" (RTval)                       \
+      : #RT, #RS, "memory"                            \
+   );                                                 \
+   printf("swl $t0, 3($t1)\nswr $t0, 0($t1)\n"        \
+          " :: RTval: 0x%x, out: 0x%x\n",             \
+          RTval, out);                                \
 }
 
 void ppMem(unsigned int* m, int len)