arm: add orc_arm_flush_cache()
authorDavid Schleef <ds@schleef.org>
Sun, 20 Sep 2009 05:33:31 +0000 (22:33 -0700)
committerDavid Schleef <ds@schleef.org>
Sun, 20 Sep 2009 05:38:59 +0000 (22:38 -0700)
orc/orcarm.c
orc/orcarm.h

index e9dccad..7ef3494 100644 (file)
@@ -504,3 +504,11 @@ orc_arm_emit_rv (OrcCompiler *p, int op, OrcArmCond cond,
   orc_arm_emit (p, code);
 }
 
+void
+orc_arm_flush_cache (OrcCompiler *compiler)
+{
+#ifdef HAVE_ARM
+  __clear_cache (compiler->program->code, compiler->codeptr);
+#endif
+}
+
index a95ade5..c0225f1 100644 (file)
@@ -99,6 +99,8 @@ void orc_arm_emit_sat (OrcCompiler *p, int op, OrcArmCond cond,
 void orc_arm_emit_rv (OrcCompiler *p, int op, OrcArmCond cond,
     int Rd, int Rm);
 
+void orc_arm_flush_cache (OrcCompiler *compiler);
+
 /* ALL cpus */
 /* data procesing instructions */
 /* <op>{<cond>}{s} {<Rd>}, <Rn>, #imm */