mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83218 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,9 +40,6 @@ def FeatureNEON : SubtargetFeature<"neon", "ARMFPUType", "NEON",
|
||||
"Enable NEON instructions">;
|
||||
def FeatureThumb2 : SubtargetFeature<"thumb2", "ThumbMode", "Thumb2",
|
||||
"Enable Thumb2 instructions">;
|
||||
def FeatureNEONFP : SubtargetFeature<"neonfp", "UseNEONForSinglePrecisionFP",
|
||||
"true",
|
||||
"Use NEON for single-precision FP">;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ARM Processors supported.
|
||||
@@ -105,7 +102,7 @@ def : ProcNoItin<"arm1156t2f-s", [ArchV6T2, FeatureThumb2, FeatureVFP2]>;
|
||||
|
||||
// V7 Processors.
|
||||
def : Processor<"cortex-a8", CortexA8Itineraries,
|
||||
[ArchV7A, FeatureThumb2, FeatureNEON, FeatureNEONFP]>;
|
||||
[ArchV7A, FeatureThumb2, FeatureNEON]>;
|
||||
def : ProcNoItin<"cortex-a9", [ArchV7A, FeatureThumb2, FeatureNEON]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -21,12 +21,16 @@ using namespace llvm;
|
||||
static cl::opt<bool>
|
||||
ReserveR9("arm-reserve-r9", cl::Hidden,
|
||||
cl::desc("Reserve R9, making it unavailable as GPR"));
|
||||
static cl::opt<bool>
|
||||
UseNEONFP("arm-use-neon-fp",
|
||||
cl::desc("Use NEON for single-precision FP"),
|
||||
cl::init(false), cl::Hidden);
|
||||
|
||||
ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS,
|
||||
bool isThumb)
|
||||
: ARMArchVersion(V4T)
|
||||
, ARMFPUType(None)
|
||||
, UseNEONForSinglePrecisionFP(false)
|
||||
, UseNEONForSinglePrecisionFP(UseNEONFP)
|
||||
, IsThumb(isThumb)
|
||||
, ThumbMode(Thumb1)
|
||||
, PostRAScheduler(false)
|
||||
@@ -97,6 +101,8 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS,
|
||||
// Set CPU specific features.
|
||||
if (CPUString == "cortex-a8") {
|
||||
PostRAScheduler = true;
|
||||
if (UseNEONFP.getPosition() == 0)
|
||||
UseNEONForSinglePrecisionFP = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user