Index: lib/Target/ARM/ARMSubtarget.cpp |
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp |
index e53cef17140fc0e0b8465b630358a4e477f30e8c..29d59b6ce93952ccb78a40ffc0a82cc325f3bb4e 100644 |
--- a/lib/Target/ARM/ARMSubtarget.cpp |
+++ b/lib/Target/ARM/ARMSubtarget.cpp |
@@ -45,6 +45,15 @@ ReserveR9("arm-reserve-r9", cl::Hidden, |
static cl::opt<bool> |
ArmUseMOVT("arm-use-movt", cl::init(true), cl::Hidden); |
+// @LOCALMOD-START |
+// TODO: * JITing has not been tested at all |
+// * Thumb mode operation is also not clear: it seems jump tables |
+// for thumb are broken independent of this option |
+static cl::opt<bool> |
+NoInlineJumpTables("no-inline-jumptables", |
+ cl::desc("Do not place jump tables inline in the code")); |
+// @LOCALMOD-END |
+ |
static cl::opt<bool> |
UseFusedMulOps("arm-use-mulops", |
cl::init(true), cl::Hidden); |
@@ -179,6 +188,10 @@ void ARMSubtarget::initializeEnvironment() { |
HasFPARMv8 = false; |
HasNEON = false; |
UseNEONForSinglePrecisionFP = false; |
+ // @LOCALMOD-START |
+ UseInlineJumpTables = !NoInlineJumpTables; |
+ UseConstIslands = true; |
+ // @LOCALMOD-END |
UseMulOps = UseFusedMulOps; |
SlowFPVMLx = false; |
HasVMLxForwarding = false; |
@@ -285,6 +298,17 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { |
SupportsTailCall = !isThumb1Only(); |
} |
+ // @LOCALMOD-BEGIN |
+ if (isTargetNaCl()) { |
+ // NaCl reserves R9 for TLS. |
+ IsR9Reserved = true; |
+ // NaCl uses MovT to avoid generating constant islands. |
+ UseMovt = true; |
+ UseInlineJumpTables = false; |
+ UseConstIslands = false; |
+ } |
+ // @LOCALMOD-END |
+ |
if (Align == DefaultAlign) { |
// Assume pre-ARMv6 doesn't support unaligned accesses. |
// |