1 From 37aee898ae3a8041aad2a7cc595b8a6cf7438b52 Mon Sep 17 00:00:00 2001 2 From: Tim Murray <timmurray (a] google.com> 3 Date: Thu, 3 Apr 2014 11:14:41 -0700 4 Subject: [PATCH 3/5] Add support for 64-bit longs. 5 6 Change-Id: I7d50c91b8324fa81c29595a8dc19f2180653a4f2 7 --- 8 lib/Target/ARM/ARM.td | 4 ++++ 9 lib/Target/ARM/ARMSubtarget.cpp | 1 + 10 lib/Target/ARM/ARMSubtarget.h | 3 +++ 11 3 files changed, 8 insertions(+) 12 13 diff --git a/lib/Target/ARM/ARM.td b/lib/Target/ARM/ARM.td 14 index 7916ccc..25385a6 100644 15 --- a/lib/Target/ARM/ARM.td 16 +++ b/lib/Target/ARM/ARM.td 17 @@ -267,6 +267,10 @@ def FeatureAPCS : SubtargetFeature<"apcs", "TargetABI", "ARM_ABI_APCS", 18 def FeatureAAPCS : SubtargetFeature<"aapcs", "TargetABI", "ARM_ABI_AAPCS", 19 "Use the AAPCS ABI">; 20 21 +// RenderScript-specific support for 64-bit long types on all targets 22 +def FeatureLong64 : SubtargetFeature<"long64", "UseLong64", 23 + "true", 24 + "long type is forced to be 64-bit">; 25 26 class ProcNoItin<string Name, list<SubtargetFeature> Features> 27 : Processor<Name, NoItineraries, Features>; 28 diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp 29 index 5222c1b..73e2018 100644 30 --- a/lib/Target/ARM/ARMSubtarget.cpp 31 +++ b/lib/Target/ARM/ARMSubtarget.cpp 32 @@ -139,6 +139,7 @@ void ARMSubtarget::initializeEnvironment() { 33 Thumb2DSP = false; 34 UseNaClTrap = false; 35 UnsafeFPMath = false; 36 + UseLong64 = false; 37 } 38 39 void ARMSubtarget::resetSubtargetFeatures(const MachineFunction *MF) { 40 diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h 41 index 804f238..3855419 100644 42 --- a/lib/Target/ARM/ARMSubtarget.h 43 +++ b/lib/Target/ARM/ARMSubtarget.h 44 @@ -197,6 +197,9 @@ protected: 45 /// NaCl TRAP instruction is generated instead of the regular TRAP. 46 bool UseNaClTrap; 47 48 + /// Force long to be a 64-bit type (RenderScript-specific) 49 + bool UseLong64; 50 + 51 /// Target machine allowed unsafe FP math (such as use of NEON fp) 52 bool UnsafeFPMath; 53 54 -- 55 1.9.1.423.g4596e3a 56 57