ARM: Implement DSB, DMB, ISB
authorGene Wu <Gene.Wu@arm.com>
Mon, 23 Aug 2010 16:18:41 +0000 (11:18 -0500)
committerGene Wu <Gene.Wu@arm.com>
Mon, 23 Aug 2010 16:18:41 +0000 (11:18 -0500)
src/arch/arm/isa/formats/branch.isa
src/arch/arm/isa/formats/uncond.isa
src/arch/arm/isa/insts/misc.isa

index 44a2f5251bcdd7576485135146d37a8a14d0f2e8..b1818adf02e033026ed7287884b15fc822295520 100644 (file)
@@ -196,11 +196,11 @@ def format Thumb32BranchesAndMiscCtrl() {{
                           case 0x2:
                             return new Clrex(machInst);
                           case 0x4:
-                            return new WarnUnimplemented("dsb", machInst);
+                            return new Dsb(machInst);
                           case 0x5:
-                            return new WarnUnimplemented("dmb", machInst);
+                            return new Dmb(machInst);
                           case 0x6:
-                            return new WarnUnimplemented("isb", machInst);
+                            return new Isb(machInst);
                           default:
                             break;
                         }
index 92e4db22d86f3b3d7f23ee2b00df37d27fa73c20..0ef1136077268bc21c5bb6f3a5d90bba4f114f11 100644 (file)
@@ -99,11 +99,11 @@ def format ArmUnconditional() {{
                       case 0x1:
                         return new Clrex(machInst);
                       case 0x4:
-                        return new WarnUnimplemented("dsb", machInst);
+                        return new Dsb(machInst);
                       case 0x5:
-                        return new WarnUnimplemented("dmb", machInst);
+                        return new Dmb(machInst);
                       case 0x6:
-                        return new WarnUnimplemented("isb", machInst);
+                        return new Isb(machInst);
                     }
                 }
             } else if (bits(op2, 0) == 0) {
index 09364cd23995ce092b5018caedcb4a10bd6cb25d..5a28a9dba76cf0eb60dcb9f00c08ca0fe2913c0a 100644 (file)
@@ -679,6 +679,33 @@ let {{
     decoder_output += BasicConstructor.subst(clrexIop)
     exec_output += PredOpExecute.subst(clrexIop)
 
+    isbCode = '''
+    '''
+    isbIop = InstObjParams("isb", "Isb", "PredOp",
+                             {"code": isbCode,
+                               "predicate_test": predicateTest}, ['IsSerializing'])
+    header_output += BasicDeclare.subst(isbIop)
+    decoder_output += BasicConstructor.subst(isbIop)
+    exec_output += PredOpExecute.subst(isbIop)
+
+    dsbCode = '''
+    '''
+    dsbIop = InstObjParams("dsb", "Dsb", "PredOp",
+                             {"code": dsbCode,
+                               "predicate_test": predicateTest},['IsMemBarrier'])
+    header_output += BasicDeclare.subst(dsbIop)
+    decoder_output += BasicConstructor.subst(dsbIop)
+    exec_output += PredOpExecute.subst(dsbIop)
+
+    dmbCode = '''
+    '''
+    dmbIop = InstObjParams("dmb", "Dmb", "PredOp",
+                             {"code": dmbCode,
+                               "predicate_test": predicateTest},['IsMemBarrier'])
+    header_output += BasicDeclare.subst(dmbIop)
+    decoder_output += BasicConstructor.subst(dmbIop)
+    exec_output += PredOpExecute.subst(dmbIop)
+
     cpsCode = '''
     uint32_t mode = bits(imm, 4, 0);
     uint32_t f = bits(imm, 5);