x86 source code hack and slash

Made a pass over the compiler source to get it into a compileable
state for the x86 target.  Lots of temporary #ifdefs, but it
compiles and makes it to oatArchInit().

Change-Id: Ib8bcd2a032e47dcb83430dbc479a29758e084359
diff --git a/src/compiler/codegen/LocalOptimizations.cc b/src/compiler/codegen/LocalOptimizations.cc
index 19b41e7..3bed72f 100644
--- a/src/compiler/codegen/LocalOptimizations.cc
+++ b/src/compiler/codegen/LocalOptimizations.cc
@@ -102,6 +102,10 @@
          */
         if (!(thisMemMask & (ENCODE_LITERAL | ENCODE_DALVIK_REG))) continue;
 
+// FIXME: make sure we have a branch barrier for x86
+#if defined(TARGET_X86)
+        u8 stopUseRegMask = (thisLIR->useMask) & ~ENCODE_MEM;
+#else
         /*
          * Add r15 (pc) to the resource mask to prevent this instruction
          * from sinking past branch instructions. Also take out the memory
@@ -110,6 +114,7 @@
          */
         u8 stopUseRegMask = (ENCODE_REG_PC | thisLIR->useMask) &
                             ~ENCODE_MEM;
+#endif
         u8 stopDefRegMask = thisLIR->defMask & ~ENCODE_MEM;
 
         for (checkLIR = NEXT_LIR(thisLIR);
@@ -280,6 +285,7 @@
 
         u8 stopUseAllMask = thisLIR->useMask;
 
+#if !defined(TARGET_X86)
         /*
          * Branches for null/range checks are marked with the true resource
          * bits, and loads to Dalvik registers, constant pools, and non-alias
@@ -289,6 +295,7 @@
         if (stopUseAllMask & ENCODE_HEAP_REF) {
             stopUseAllMask |= ENCODE_REG_PC;
         }
+#endif
 
         /* Similar as above, but just check for pure register dependency */
         u8 stopUseRegMask = stopUseAllMask & ~ENCODE_MEM;