Some debugging of the ccr bits
authorGabe Black <gblack@eecs.umich.edu>
Fri, 28 Apr 2006 17:10:52 +0000 (13:10 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Fri, 28 Apr 2006 17:10:52 +0000 (13:10 -0400)
--HG--
extra : convert_revision : b3d100b2e34dcecc3ba33c9ad4b0b7e40c210ecc

arch/sparc/isa/formats/integerop.isa

index 401af2e51c4c82e390a68485c34933a813528fba..407a3e3cd017b23b9b0d1dba190a338eb1209882 100644 (file)
@@ -271,14 +271,22 @@ let {{
         return (header_output, decoder_output, exec_output, decode_block)
 
     calcCcCode = '''
-        CcrIccN = (Rd >> 63) & 1;
-        CcrIccZ = (Rd == 0);
-        CcrXccN = (Rd >> 31) & 1;
-        CcrXccZ = ((Rd & 0xFFFFFFFF) == 0);
+        CcrIccN = (Rd >> 31) & 1;
+        CcrIccZ = ((Rd & 0xFFFFFFFF) == 0);
+        CcrXccN = (Rd >> 63) & 1;
+        CcrXccZ = (Rd == 0);
         CcrIccV = %(ivValue)s;
         CcrIccC = %(icValue)s;
         CcrXccV = %(xvValue)s;
         CcrXccC = %(xcValue)s;
+        DPRINTF(Sparc, "in = %%d\\n", CcrIccN);
+        DPRINTF(Sparc, "iz = %%d\\n", CcrIccZ);
+        DPRINTF(Sparc, "xn = %%d\\n", CcrXccN);
+        DPRINTF(Sparc, "xz = %%d\\n", CcrXccZ);
+        DPRINTF(Sparc, "iv = %%d\\n", CcrIccV);
+        DPRINTF(Sparc, "ic = %%d\\n", CcrIccC);
+        DPRINTF(Sparc, "xv = %%d\\n", CcrXccV);
+        DPRINTF(Sparc, "xc = %%d\\n", CcrXccC);
         '''
 }};