ARM: Add in some new artificial fields that make decoding a little easier.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 2 Jul 2009 05:11:27 +0000 (22:11 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 2 Jul 2009 05:11:27 +0000 (22:11 -0700)
src/arch/arm/isa/bitfields.isa
src/arch/arm/predecoder.hh
src/arch/arm/types.hh

index 44b0b34589e1196f82d6a7d0f78e8f9c962e93ec..5ad874003faefe8c138ee78acca002143fd3c102 100644 (file)
@@ -61,6 +61,9 @@ def bitfield OPCODE_6    opcode6;
 def bitfield OPCODE_5     opcode5;
 def bitfield OPCODE_4      opcode4;
 
+def bitfield IS_MISC       isMisc;
+def bitfield SEVEN_AND_FOUR sevenAndFour;
+
 // Other
 def bitfield COND_CODE     condCode;
 def bitfield S_FIELD       sField;
index 2c0b773a061ba18d57257dab4fc04dec9046ffa4..bd4a7b03ba556f3b48e8e78258685f1963ac4e55 100644 (file)
@@ -73,6 +73,8 @@ namespace ArmISA
         void moreBytes(Addr pc, Addr fetchPC, MachInst inst)
         {
             emi = inst;
+            emi.sevenAndFour = bits(inst, 7) && bits(inst, 4);
+            emi.isMisc = (bits(inst, 24, 23) == 0x2 && bits(inst, 20) == 0);
         }
 
         //Use this to give data to the predecoder. This should be used
index 98070a87478bcebc7268e49f1d615fbc694e2d65..d87bad412d1ea595be243baac6925d2b964229c7 100644 (file)
@@ -38,7 +38,11 @@ namespace ArmISA
 {
     typedef uint32_t MachInst;
 
-    BitUnion32(ExtMachInst)
+    BitUnion64(ExtMachInst)
+        // Made up bitfields that make life easier.
+        Bitfield<33>     sevenAndFour;
+        Bitfield<32>     isMisc;
+
         // All the different types of opcode fields.
         Bitfield<27, 25> opcode;
         Bitfield<27, 25> opcode27_25;