mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
Add convenient helper for win64 check. Simplify things slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f88cb0899
commit
1a979d9eab
@ -101,8 +101,7 @@ def RetCC_X86_32 : CallingConv<[
|
|||||||
// This is the root return-value convention for the X86-64 backend.
|
// This is the root return-value convention for the X86-64 backend.
|
||||||
def RetCC_X86_64 : CallingConv<[
|
def RetCC_X86_64 : CallingConv<[
|
||||||
// Mingw64 and native Win64 use Win64 CC
|
// Mingw64 and native Win64 use Win64 CC
|
||||||
CCIfSubtarget<"isTargetMingw()", CCDelegateTo<RetCC_X86_Win64_C>>,
|
CCIfSubtarget<"isTargetWin64()", CCDelegateTo<RetCC_X86_Win64_C>>,
|
||||||
CCIfSubtarget<"isTargetWindows()", CCDelegateTo<RetCC_X86_Win64_C>>,
|
|
||||||
|
|
||||||
// Otherwise, drop to normal X86-64 CC
|
// Otherwise, drop to normal X86-64 CC
|
||||||
CCDelegateTo<RetCC_X86_64_C>
|
CCDelegateTo<RetCC_X86_64_C>
|
||||||
|
@ -1009,7 +1009,7 @@ CCAssignFn *X86TargetLowering::CCAssignFnForNode(SDOperand Op) const {
|
|||||||
unsigned CC = cast<ConstantSDNode>(Op.getOperand(1))->getValue();
|
unsigned CC = cast<ConstantSDNode>(Op.getOperand(1))->getValue();
|
||||||
|
|
||||||
if (Subtarget->is64Bit()) {
|
if (Subtarget->is64Bit()) {
|
||||||
if (Subtarget->isTargetWindows() || Subtarget->isTargetMingw())
|
if (Subtarget->isTargetWin64())
|
||||||
return CC_X86_Win64_C;
|
return CC_X86_Win64_C;
|
||||||
else {
|
else {
|
||||||
if (CC == CallingConv::Fast && PerformTailCallOpt)
|
if (CC == CallingConv::Fast && PerformTailCallOpt)
|
||||||
|
@ -138,6 +138,9 @@ public:
|
|||||||
bool isTargetCygMing() const { return (TargetType == isMingw ||
|
bool isTargetCygMing() const { return (TargetType == isMingw ||
|
||||||
TargetType == isCygwin); }
|
TargetType == isCygwin); }
|
||||||
bool isTargetCygwin() const { return TargetType == isCygwin; }
|
bool isTargetCygwin() const { return TargetType == isCygwin; }
|
||||||
|
bool isTargetWin64() const {
|
||||||
|
return (Is64Bit && (TargetType == isMingw || TargetType == isWindows));
|
||||||
|
}
|
||||||
|
|
||||||
std::string getDataLayout() const {
|
std::string getDataLayout() const {
|
||||||
const char *p;
|
const char *p;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user