mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Minor changes to improve comments and fix the build on _WIN32 systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22391 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -21,7 +21,7 @@ X86Subtarget::X86Subtarget(const Module &M)
|
|||||||
asmLeadingUnderscore(false), asmAlignmentIsInBytes(false),
|
asmLeadingUnderscore(false), asmAlignmentIsInBytes(false),
|
||||||
asmPrintDotLocalConstants(false), asmPrintDotLCommConstants(false),
|
asmPrintDotLocalConstants(false), asmPrintDotLCommConstants(false),
|
||||||
asmPrintConstantAlignment(false) {
|
asmPrintConstantAlignment(false) {
|
||||||
// Declare a boolean for each platform
|
// Declare a boolean for each major platform.
|
||||||
bool forCygwin = false;
|
bool forCygwin = false;
|
||||||
bool forDarwin = false;
|
bool forDarwin = false;
|
||||||
bool forWindows = false;
|
bool forWindows = false;
|
||||||
@@ -40,20 +40,18 @@ X86Subtarget::X86Subtarget(const Module &M)
|
|||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
forDarwin = true;
|
forDarwin = true;
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
forWindws = true;
|
forWindows = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forCygwin) {
|
if (forCygwin) {
|
||||||
asmLeadingUnderscore = true;
|
asmLeadingUnderscore = true;
|
||||||
}
|
} else if (forDarwin) {
|
||||||
if (forDarwin) {
|
|
||||||
stackAlignment = 16;
|
stackAlignment = 16;
|
||||||
indirectExternAndWeakGlobals = true;
|
indirectExternAndWeakGlobals = true;
|
||||||
asmDarwinLinkerStubs = true;
|
asmDarwinLinkerStubs = true;
|
||||||
asmLeadingUnderscore = true;
|
asmLeadingUnderscore = true;
|
||||||
asmPrintDotLCommConstants = true;
|
asmPrintDotLCommConstants = true;
|
||||||
}
|
} else if (forWindows) {
|
||||||
if (forWindows) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,8 @@ class Module;
|
|||||||
|
|
||||||
class X86Subtarget : public TargetSubtarget {
|
class X86Subtarget : public TargetSubtarget {
|
||||||
protected:
|
protected:
|
||||||
/// Used by the target machine to set up the target frame info
|
/// stackAlignment - The minimum alignment known to hold of the stack frame on
|
||||||
|
/// entry to the function and which must be maintained by every function.
|
||||||
unsigned stackAlignment;
|
unsigned stackAlignment;
|
||||||
|
|
||||||
/// Used by instruction selector
|
/// Used by instruction selector
|
||||||
@@ -39,16 +40,18 @@ public:
|
|||||||
/// of the specified module.
|
/// of the specified module.
|
||||||
///
|
///
|
||||||
X86Subtarget(const Module &M);
|
X86Subtarget(const Module &M);
|
||||||
|
|
||||||
/// Returns the preferred stack alignment for the current target triple, or
|
/// getStackAlignment - Returns the minimum alignment known to hold of the
|
||||||
/// the default if no target triple is set.
|
/// stack frame on entry to the function and which must be maintained by every
|
||||||
|
/// function for this subtarget.
|
||||||
unsigned getStackAlignment() const { return stackAlignment; }
|
unsigned getStackAlignment() const { return stackAlignment; }
|
||||||
|
|
||||||
/// Returns true if the instruction selector should treat global values
|
/// Returns true if the instruction selector should treat global values
|
||||||
/// referencing external or weak symbols as indirect rather than direct
|
/// referencing external or weak symbols as indirect rather than direct
|
||||||
/// references.
|
/// references.
|
||||||
bool getIndirectExternAndWeakGlobals() const {
|
bool getIndirectExternAndWeakGlobals() const {
|
||||||
return indirectExternAndWeakGlobals; }
|
return indirectExternAndWeakGlobals;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user