SPARC: Adjust the "call" instruction so R15 doesn't get marked as a source.
authorGabe Black <gblack@eecs.umich.edu>
Sat, 15 Jan 2011 23:30:17 +0000 (15:30 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Sat, 15 Jan 2011 23:30:17 +0000 (15:30 -0800)
src/arch/sparc/isa/decoder.isa

index e1d4a8fbdbb23dde7d08a43fe81ff80ce564a34f..5ca015a8f0412bc3faba5a012f8c8a43aabf8bf3 100644 (file)
@@ -138,11 +138,9 @@ decode OP default Unknown::unknown()
         }
     }
     0x1: BranchN::call(30, {{
-            if (Pstate<3:>)
-                R15 = (PC)<31:0>;
-            else
-                R15 = PC;
-            NNPC = R15 + disp;
+            IntReg midVal;
+            R15 = midVal = (Pstate<3:> ? (PC)<31:0> : PC);
+            NNPC = midVal + disp;
     }});
     0x2: decode OP3 {
         format IntOp {