From 37aee898ae3a8041aad2a7cc595b8a6cf7438b52 Mon Sep 17 00:00:00 2001 From: Tim Murray <timmurray@google.com> Date: Thu, 3 Apr 2014 11:14:41 -0700 Subject: [PATCH 3/5] Add support for 64-bit longs. Change-Id: I7d50c91b8324fa81c29595a8dc19f2180653a4f2 --- lib/Target/ARM/ARM.td | 4 ++++ lib/Target/ARM/ARMSubtarget.cpp | 1 + lib/Target/ARM/ARMSubtarget.h | 3 +++ 3 files changed, 8 insertions(+) diff --git a/lib/Target/ARM/ARM.td b/lib/Target/ARM/ARM.td index 7916ccc..25385a6 100644 --- a/lib/Target/ARM/ARM.td +++ b/lib/Target/ARM/ARM.td @@ -267,6 +267,10 @@ def FeatureAPCS : SubtargetFeature<"apcs", "TargetABI", "ARM_ABI_APCS", def FeatureAAPCS : SubtargetFeature<"aapcs", "TargetABI", "ARM_ABI_AAPCS", "Use the AAPCS ABI">; +// RenderScript-specific support for 64-bit long types on all targets +def FeatureLong64 : SubtargetFeature<"long64", "UseLong64", + "true", + "long type is forced to be 64-bit">; class ProcNoItin<string Name, list<SubtargetFeature> Features> : Processor<Name, NoItineraries, Features>; diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 5222c1b..73e2018 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -139,6 +139,7 @@ void ARMSubtarget::initializeEnvironment() { Thumb2DSP = false; UseNaClTrap = false; UnsafeFPMath = false; + UseLong64 = false; } void ARMSubtarget::resetSubtargetFeatures(const MachineFunction *MF) { diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index 804f238..3855419 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -197,6 +197,9 @@ protected: /// NaCl TRAP instruction is generated instead of the regular TRAP. bool UseNaClTrap; + /// Force long to be a 64-bit type (RenderScript-specific) + bool UseLong64; + /// Target machine allowed unsafe FP math (such as use of NEON fp) bool UnsafeFPMath; -- 1.9.1.423.g4596e3a