mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Simplify the subtarget info, allow the asmwriter to do some target sensing
based on TargetType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a35a8e87fa
commit
d460f57d65
@ -16,11 +16,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
X86Subtarget::X86Subtarget(const Module &M, const std::string &FS)
|
||||
: TargetSubtarget(), stackAlignment(8),
|
||||
indirectExternAndWeakGlobals(false), asmDarwinLinkerStubs(false),
|
||||
asmLeadingUnderscore(false), asmAlignmentIsInBytes(false),
|
||||
asmPrintDotLocalConstants(false), asmPrintDotLCommConstants(false),
|
||||
asmPrintConstantAlignment(false) {
|
||||
: stackAlignment(8), indirectExternAndWeakGlobals(false) {
|
||||
|
||||
// Default to ELF unless otherwise specified.
|
||||
TargetType = isELF;
|
||||
@ -46,17 +42,8 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS)
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (TargetType) {
|
||||
case isCygwin:
|
||||
asmLeadingUnderscore = true;
|
||||
break;
|
||||
case isDarwin:
|
||||
if (TargetType == isDarwin) {
|
||||
stackAlignment = 16;
|
||||
indirectExternAndWeakGlobals = true;
|
||||
asmDarwinLinkerStubs = true;
|
||||
asmLeadingUnderscore = true;
|
||||
asmPrintDotLCommConstants = true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -30,13 +30,6 @@ protected:
|
||||
/// Used by instruction selector
|
||||
bool indirectExternAndWeakGlobals;
|
||||
|
||||
/// Used by the asm printer
|
||||
bool asmDarwinLinkerStubs;
|
||||
bool asmLeadingUnderscore;
|
||||
bool asmAlignmentIsInBytes;
|
||||
bool asmPrintDotLocalConstants;
|
||||
bool asmPrintDotLCommConstants;
|
||||
bool asmPrintConstantAlignment;
|
||||
public:
|
||||
enum {
|
||||
isELF, isCygwin, isDarwin, isWindows
|
||||
|
Loading…
Reference in New Issue
Block a user