mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
Cleanup stdcall / fastcall name mangling.
This should fix alot of problems we saw so far, e.g. PRs 5851 & 2936 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95980 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -308,7 +308,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// GetGlobalValueSymbol - Return the MCSymbol for the specified global
|
/// GetGlobalValueSymbol - Return the MCSymbol for the specified global
|
||||||
/// value.
|
/// value.
|
||||||
MCSymbol *GetGlobalValueSymbol(const GlobalValue *GV) const;
|
virtual MCSymbol *GetGlobalValueSymbol(const GlobalValue *GV) const;
|
||||||
|
|
||||||
/// GetSymbolWithGlobalValueBase - Return the MCSymbol for a symbol with
|
/// GetSymbolWithGlobalValueBase - Return the MCSymbol for a symbol with
|
||||||
/// global value name as its base, with the specified suffix, and where the
|
/// global value name as its base, with the specified suffix, and where the
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/FormattedStream.h"
|
#include "llvm/Support/FormattedStream.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
|
#include "llvm/Target/Mangler.h"
|
||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
#include "llvm/Target/TargetRegistry.h"
|
||||||
@@ -52,32 +53,34 @@ void X86AsmPrinter::PrintPICBaseSymbol() const {
|
|||||||
OutContext);
|
OutContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MCSymbol *X86AsmPrinter::GetGlobalValueSymbol(const GlobalValue *GV) const {
|
||||||
|
SmallString<60> NameStr;
|
||||||
|
Mang->getNameWithPrefix(NameStr, GV, false);
|
||||||
|
MCSymbol *Symb = OutContext.GetOrCreateSymbol(NameStr.str());
|
||||||
|
|
||||||
|
if (Subtarget->isTargetCygMing()) {
|
||||||
|
X86COFFMachineModuleInfo &COFFMMI =
|
||||||
|
MMI->getObjFileInfo<X86COFFMachineModuleInfo>();
|
||||||
|
COFFMMI.DecorateCygMingName(Symb, OutContext, GV, *TM.getTargetData());
|
||||||
|
|
||||||
|
// Save function name for later type emission.
|
||||||
|
if (const Function *F = dyn_cast<Function>(GV))
|
||||||
|
if (F->isDeclaration())
|
||||||
|
COFFMMI.addExternalFunction(Symb->getName());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return Symb;
|
||||||
|
}
|
||||||
|
|
||||||
/// runOnMachineFunction - Emit the function body.
|
/// runOnMachineFunction - Emit the function body.
|
||||||
///
|
///
|
||||||
bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||||
SetupMachineFunction(MF);
|
SetupMachineFunction(MF);
|
||||||
|
|
||||||
// COFF and Cygwin specific mangling stuff. This should be moved out to the
|
|
||||||
// mangler or handled some other way?
|
|
||||||
if (Subtarget->isTargetCOFF()) {
|
if (Subtarget->isTargetCOFF()) {
|
||||||
X86COFFMachineModuleInfo &COFFMMI =
|
|
||||||
MMI->getObjFileInfo<X86COFFMachineModuleInfo>();
|
|
||||||
|
|
||||||
// Populate function information map. Don't want to populate
|
|
||||||
// non-stdcall or non-fastcall functions' information right now.
|
|
||||||
const Function *F = MF.getFunction();
|
const Function *F = MF.getFunction();
|
||||||
CallingConv::ID CC = F->getCallingConv();
|
O << "\t.def\t " << *CurrentFnSym << ";\t.scl\t" <<
|
||||||
if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall)
|
|
||||||
COFFMMI.AddFunctionInfo(F, *MF.getInfo<X86MachineFunctionInfo>());
|
|
||||||
}
|
|
||||||
if (Subtarget->isTargetCygMing()) {
|
|
||||||
const Function *F = MF.getFunction();
|
|
||||||
X86COFFMachineModuleInfo &COFFMMI =
|
|
||||||
MMI->getObjFileInfo<X86COFFMachineModuleInfo>();
|
|
||||||
COFFMMI.DecorateCygMingName(CurrentFnSym, OutContext,F,*TM.getTargetData());
|
|
||||||
|
|
||||||
O << "\t.def\t " << *CurrentFnSym;
|
|
||||||
O << ";\t.scl\t" <<
|
|
||||||
(F->hasInternalLinkage() ? COFF::C_STAT : COFF::C_EXT)
|
(F->hasInternalLinkage() ? COFF::C_STAT : COFF::C_EXT)
|
||||||
<< ";\t.type\t" << (COFF::DT_FCN << COFF::N_BTSHFT)
|
<< ";\t.type\t" << (COFF::DT_FCN << COFF::N_BTSHFT)
|
||||||
<< ";\t.endef\n";
|
<< ";\t.endef\n";
|
||||||
@@ -119,12 +122,6 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO) {
|
|||||||
else
|
else
|
||||||
GVSym = GetGlobalValueSymbol(GV);
|
GVSym = GetGlobalValueSymbol(GV);
|
||||||
|
|
||||||
if (Subtarget->isTargetCygMing()) {
|
|
||||||
X86COFFMachineModuleInfo &COFFMMI =
|
|
||||||
MMI->getObjFileInfo<X86COFFMachineModuleInfo>();
|
|
||||||
COFFMMI.DecorateCygMingName(GVSym, OutContext, GV, *TM.getTargetData());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle dllimport linkage.
|
// Handle dllimport linkage.
|
||||||
if (MO.getTargetFlags() == X86II::MO_DLLIMPORT)
|
if (MO.getTargetFlags() == X86II::MO_DLLIMPORT)
|
||||||
GVSym = OutContext.GetOrCreateSymbol(Twine("__imp_") + GVSym->getName());
|
GVSym = OutContext.GetOrCreateSymbol(Twine("__imp_") + GVSym->getName());
|
||||||
@@ -585,7 +582,6 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
|||||||
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
|
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||||
if (I->hasDLLExportLinkage()) {
|
if (I->hasDLLExportLinkage()) {
|
||||||
MCSymbol *Sym = GetGlobalValueSymbol(I);
|
MCSymbol *Sym = GetGlobalValueSymbol(I);
|
||||||
COFFMMI.DecorateCygMingName(Sym, OutContext, I, *TM.getTargetData());
|
|
||||||
DLLExportedFns.push_back(Sym);
|
DLLExportedFns.push_back(Sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,8 +61,7 @@ class VISIBILITY_HIDDEN X86AsmPrinter : public AsmPrinter {
|
|||||||
virtual void EmitInstruction(const MachineInstr *MI);
|
virtual void EmitInstruction(const MachineInstr *MI);
|
||||||
|
|
||||||
void printSymbolOperand(const MachineOperand &MO);
|
void printSymbolOperand(const MachineOperand &MO);
|
||||||
|
virtual MCSymbol *GetGlobalValueSymbol(const GlobalValue *GV) const;
|
||||||
|
|
||||||
|
|
||||||
// These methods are used by the tablegen'erated instruction printer.
|
// These methods are used by the tablegen'erated instruction printer.
|
||||||
void printOperand(const MachineInstr *MI, unsigned OpNo,
|
void printOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
|
@@ -27,85 +27,50 @@ X86COFFMachineModuleInfo::X86COFFMachineModuleInfo(const MachineModuleInfo &) {
|
|||||||
X86COFFMachineModuleInfo::~X86COFFMachineModuleInfo() {
|
X86COFFMachineModuleInfo::~X86COFFMachineModuleInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void X86COFFMachineModuleInfo::AddFunctionInfo(const Function *F,
|
void X86COFFMachineModuleInfo::addExternalFunction(const StringRef& Name) {
|
||||||
const X86MachineFunctionInfo &Val) {
|
CygMingStubs.insert(Name);
|
||||||
FunctionInfoMap[F] = Val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// DecorateCygMingName - Apply various name decorations if the function uses
|
||||||
|
/// stdcall or fastcall calling convention.
|
||||||
static X86MachineFunctionInfo calculateFunctionInfo(const Function *F,
|
|
||||||
const TargetData &TD) {
|
|
||||||
X86MachineFunctionInfo Info;
|
|
||||||
uint64_t Size = 0;
|
|
||||||
|
|
||||||
switch (F->getCallingConv()) {
|
|
||||||
case CallingConv::X86_StdCall:
|
|
||||||
Info.setDecorationStyle(StdCall);
|
|
||||||
break;
|
|
||||||
case CallingConv::X86_FastCall:
|
|
||||||
Info.setDecorationStyle(FastCall);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return Info;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned argNum = 1;
|
|
||||||
for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
|
|
||||||
AI != AE; ++AI, ++argNum) {
|
|
||||||
const Type* Ty = AI->getType();
|
|
||||||
|
|
||||||
// 'Dereference' type in case of byval parameter attribute
|
|
||||||
if (F->paramHasAttr(argNum, Attribute::ByVal))
|
|
||||||
Ty = cast<PointerType>(Ty)->getElementType();
|
|
||||||
|
|
||||||
// Size should be aligned to DWORD boundary
|
|
||||||
Size += ((TD.getTypeAllocSize(Ty) + 3)/4)*4;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We're not supporting tooooo huge arguments :)
|
|
||||||
Info.setBytesToPopOnReturn((unsigned int)Size);
|
|
||||||
return Info;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// DecorateCygMingName - Query FunctionInfoMap and use this information for
|
|
||||||
/// various name decorations for Cygwin and MingW.
|
|
||||||
void X86COFFMachineModuleInfo::DecorateCygMingName(SmallVectorImpl<char> &Name,
|
void X86COFFMachineModuleInfo::DecorateCygMingName(SmallVectorImpl<char> &Name,
|
||||||
const GlobalValue *GV,
|
const GlobalValue *GV,
|
||||||
const TargetData &TD) {
|
const TargetData &TD) {
|
||||||
const Function *F = dyn_cast<Function>(GV);
|
const Function *F = dyn_cast<Function>(GV);
|
||||||
if (!F) return;
|
if (!F) return;
|
||||||
|
|
||||||
// Save function name for later type emission.
|
|
||||||
if (F->isDeclaration())
|
|
||||||
CygMingStubs.insert(StringRef(Name.data(), Name.size()));
|
|
||||||
|
|
||||||
// We don't want to decorate non-stdcall or non-fastcall functions right now
|
// We don't want to decorate non-stdcall or non-fastcall functions right now
|
||||||
CallingConv::ID CC = F->getCallingConv();
|
CallingConv::ID CC = F->getCallingConv();
|
||||||
if (CC != CallingConv::X86_StdCall && CC != CallingConv::X86_FastCall)
|
if (CC != CallingConv::X86_StdCall && CC != CallingConv::X86_FastCall)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const X86MachineFunctionInfo *Info;
|
unsigned ArgWords = 0;
|
||||||
|
DenseMap<const Function*, unsigned>::const_iterator item = FnArgWords.find(F);
|
||||||
|
if (item == FnArgWords.end()) {
|
||||||
|
// Calculate arguments sizes
|
||||||
|
for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
|
||||||
|
AI != AE; ++AI) {
|
||||||
|
const Type* Ty = AI->getType();
|
||||||
|
|
||||||
FMFInfoMap::const_iterator info_item = FunctionInfoMap.find(F);
|
// 'Dereference' type in case of byval parameter attribute
|
||||||
if (info_item == FunctionInfoMap.end()) {
|
if (AI->hasByValAttr())
|
||||||
// Calculate apropriate function info and populate map
|
Ty = cast<PointerType>(Ty)->getElementType();
|
||||||
FunctionInfoMap[F] = calculateFunctionInfo(F, TD);
|
|
||||||
Info = &FunctionInfoMap[F];
|
// Size should be aligned to DWORD boundary
|
||||||
} else {
|
ArgWords += ((TD.getTypeAllocSize(Ty) + 3)/4)*4;
|
||||||
Info = &info_item->second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Info->getDecorationStyle() == None) return;
|
FnArgWords[F] = ArgWords;
|
||||||
const FunctionType *FT = F->getFunctionType();
|
} else
|
||||||
|
ArgWords = item->second;
|
||||||
|
|
||||||
|
const FunctionType *FT = F->getFunctionType();
|
||||||
// "Pure" variadic functions do not receive @0 suffix.
|
// "Pure" variadic functions do not receive @0 suffix.
|
||||||
if (!FT->isVarArg() || FT->getNumParams() == 0 ||
|
if (!FT->isVarArg() || FT->getNumParams() == 0 ||
|
||||||
(FT->getNumParams() == 1 && F->hasStructRetAttr()))
|
(FT->getNumParams() == 1 && F->hasStructRetAttr()))
|
||||||
raw_svector_ostream(Name) << '@' << Info->getBytesToPopOnReturn();
|
raw_svector_ostream(Name) << '@' << ArgWords;
|
||||||
|
|
||||||
if (Info->getDecorationStyle() == FastCall) {
|
if (CC == CallingConv::X86_FastCall) {
|
||||||
if (Name[0] == '_')
|
if (Name[0] == '_')
|
||||||
Name[0] = '@';
|
Name[0] = '@';
|
||||||
else
|
else
|
||||||
|
@@ -26,39 +26,20 @@ namespace llvm {
|
|||||||
/// for X86 COFF targets.
|
/// for X86 COFF targets.
|
||||||
class X86COFFMachineModuleInfo : public MachineModuleInfoImpl {
|
class X86COFFMachineModuleInfo : public MachineModuleInfoImpl {
|
||||||
StringSet<> CygMingStubs;
|
StringSet<> CygMingStubs;
|
||||||
|
DenseMap<const Function*, unsigned> FnArgWords;
|
||||||
// We have to propagate some information about MachineFunction to
|
|
||||||
// AsmPrinter. It's ok, when we're printing the function, since we have
|
|
||||||
// access to MachineFunction and can get the appropriate MachineFunctionInfo.
|
|
||||||
// Unfortunately, this is not possible when we're printing reference to
|
|
||||||
// Function (e.g. calling it and so on). Even more, there is no way to get the
|
|
||||||
// corresponding MachineFunctions: it can even be not created at all. That's
|
|
||||||
// why we should use additional structure, when we're collecting all necessary
|
|
||||||
// information.
|
|
||||||
//
|
|
||||||
// This structure is using e.g. for name decoration for stdcall & fastcall'ed
|
|
||||||
// function, since we have to use arguments' size for decoration.
|
|
||||||
typedef std::map<const Function*, X86MachineFunctionInfo> FMFInfoMap;
|
|
||||||
FMFInfoMap FunctionInfoMap;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
X86COFFMachineModuleInfo(const MachineModuleInfo &);
|
X86COFFMachineModuleInfo(const MachineModuleInfo &);
|
||||||
~X86COFFMachineModuleInfo();
|
~X86COFFMachineModuleInfo();
|
||||||
|
|
||||||
|
|
||||||
void DecorateCygMingName(MCSymbol* &Name, MCContext &Ctx,
|
void DecorateCygMingName(MCSymbol* &Name, MCContext &Ctx,
|
||||||
const GlobalValue *GV, const TargetData &TD);
|
const GlobalValue *GV, const TargetData &TD);
|
||||||
void DecorateCygMingName(SmallVectorImpl<char> &Name, const GlobalValue *GV,
|
void DecorateCygMingName(SmallVectorImpl<char> &Name, const GlobalValue *GV,
|
||||||
const TargetData &TD);
|
const TargetData &TD);
|
||||||
|
|
||||||
void AddFunctionInfo(const Function *F, const X86MachineFunctionInfo &Val);
|
void addExternalFunction(const StringRef& Name);
|
||||||
|
|
||||||
|
|
||||||
typedef StringSet<>::const_iterator stub_iterator;
|
typedef StringSet<>::const_iterator stub_iterator;
|
||||||
stub_iterator stub_begin() const { return CygMingStubs.begin(); }
|
stub_iterator stub_begin() const { return CygMingStubs.begin(); }
|
||||||
stub_iterator stub_end() const { return CygMingStubs.end(); }
|
stub_iterator stub_end() const { return CygMingStubs.end(); }
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1398,18 +1398,6 @@ CCAssignFn *X86TargetLowering::CCAssignFnForNode(CallingConv::ID CC) const {
|
|||||||
return CC_X86_32_C;
|
return CC_X86_32_C;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// NameDecorationForCallConv - Selects the appropriate decoration to
|
|
||||||
/// apply to a MachineFunction containing a given calling convention.
|
|
||||||
NameDecorationStyle
|
|
||||||
X86TargetLowering::NameDecorationForCallConv(CallingConv::ID CallConv) {
|
|
||||||
if (CallConv == CallingConv::X86_FastCall)
|
|
||||||
return FastCall;
|
|
||||||
else if (CallConv == CallingConv::X86_StdCall)
|
|
||||||
return StdCall;
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// CreateCopyOfByValArgument - Make a copy of an aggregate at address specified
|
/// CreateCopyOfByValArgument - Make a copy of an aggregate at address specified
|
||||||
/// by "Src" to address "Dst" with size and alignment information specified by
|
/// by "Src" to address "Dst" with size and alignment information specified by
|
||||||
/// the specific parameter attribute. The copy will be passed as a byval
|
/// the specific parameter attribute. The copy will be passed as a byval
|
||||||
@@ -1485,9 +1473,6 @@ X86TargetLowering::LowerFormalArguments(SDValue Chain,
|
|||||||
Fn->getName() == "main")
|
Fn->getName() == "main")
|
||||||
FuncInfo->setForceFramePointer(true);
|
FuncInfo->setForceFramePointer(true);
|
||||||
|
|
||||||
// Decorate the function name.
|
|
||||||
FuncInfo->setDecorationStyle(NameDecorationForCallConv(CallConv));
|
|
||||||
|
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
bool Is64Bit = Subtarget->is64Bit();
|
bool Is64Bit = Subtarget->is64Bit();
|
||||||
bool IsWin64 = Subtarget->isTargetWin64();
|
bool IsWin64 = Subtarget->isTargetWin64();
|
||||||
|
@@ -639,7 +639,6 @@ namespace llvm {
|
|||||||
int FPDiff, DebugLoc dl);
|
int FPDiff, DebugLoc dl);
|
||||||
|
|
||||||
CCAssignFn *CCAssignFnForNode(CallingConv::ID CallConv) const;
|
CCAssignFn *CCAssignFnForNode(CallingConv::ID CallConv) const;
|
||||||
NameDecorationStyle NameDecorationForCallConv(CallingConv::ID CallConv);
|
|
||||||
unsigned GetAlignedArgumentStackSize(unsigned StackSize, SelectionDAG &DAG);
|
unsigned GetAlignedArgumentStackSize(unsigned StackSize, SelectionDAG &DAG);
|
||||||
|
|
||||||
std::pair<SDValue,SDValue> FP_TO_INTHelper(SDValue Op, SelectionDAG &DAG,
|
std::pair<SDValue,SDValue> FP_TO_INTHelper(SDValue Op, SelectionDAG &DAG,
|
||||||
|
@@ -18,12 +18,6 @@
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
enum NameDecorationStyle {
|
|
||||||
None,
|
|
||||||
StdCall,
|
|
||||||
FastCall
|
|
||||||
};
|
|
||||||
|
|
||||||
/// X86MachineFunctionInfo - This class is derived from MachineFunction and
|
/// X86MachineFunctionInfo - This class is derived from MachineFunction and
|
||||||
/// contains private X86 target-specific information for each MachineFunction.
|
/// contains private X86 target-specific information for each MachineFunction.
|
||||||
class X86MachineFunctionInfo : public MachineFunctionInfo {
|
class X86MachineFunctionInfo : public MachineFunctionInfo {
|
||||||
@@ -41,10 +35,6 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
|
|||||||
/// Used on windows platform for stdcall & fastcall name decoration
|
/// Used on windows platform for stdcall & fastcall name decoration
|
||||||
unsigned BytesToPopOnReturn;
|
unsigned BytesToPopOnReturn;
|
||||||
|
|
||||||
/// DecorationStyle - If the function requires additional name decoration,
|
|
||||||
/// DecorationStyle holds the right way to do so.
|
|
||||||
NameDecorationStyle DecorationStyle;
|
|
||||||
|
|
||||||
/// ReturnAddrIndex - FrameIndex for return slot.
|
/// ReturnAddrIndex - FrameIndex for return slot.
|
||||||
int ReturnAddrIndex;
|
int ReturnAddrIndex;
|
||||||
|
|
||||||
@@ -66,7 +56,6 @@ public:
|
|||||||
X86MachineFunctionInfo() : ForceFramePointer(false),
|
X86MachineFunctionInfo() : ForceFramePointer(false),
|
||||||
CalleeSavedFrameSize(0),
|
CalleeSavedFrameSize(0),
|
||||||
BytesToPopOnReturn(0),
|
BytesToPopOnReturn(0),
|
||||||
DecorationStyle(None),
|
|
||||||
ReturnAddrIndex(0),
|
ReturnAddrIndex(0),
|
||||||
TailCallReturnAddrDelta(0),
|
TailCallReturnAddrDelta(0),
|
||||||
SRetReturnReg(0),
|
SRetReturnReg(0),
|
||||||
@@ -76,7 +65,6 @@ public:
|
|||||||
: ForceFramePointer(false),
|
: ForceFramePointer(false),
|
||||||
CalleeSavedFrameSize(0),
|
CalleeSavedFrameSize(0),
|
||||||
BytesToPopOnReturn(0),
|
BytesToPopOnReturn(0),
|
||||||
DecorationStyle(None),
|
|
||||||
ReturnAddrIndex(0),
|
ReturnAddrIndex(0),
|
||||||
TailCallReturnAddrDelta(0),
|
TailCallReturnAddrDelta(0),
|
||||||
SRetReturnReg(0),
|
SRetReturnReg(0),
|
||||||
@@ -91,9 +79,6 @@ public:
|
|||||||
unsigned getBytesToPopOnReturn() const { return BytesToPopOnReturn; }
|
unsigned getBytesToPopOnReturn() const { return BytesToPopOnReturn; }
|
||||||
void setBytesToPopOnReturn (unsigned bytes) { BytesToPopOnReturn = bytes;}
|
void setBytesToPopOnReturn (unsigned bytes) { BytesToPopOnReturn = bytes;}
|
||||||
|
|
||||||
NameDecorationStyle getDecorationStyle() const { return DecorationStyle; }
|
|
||||||
void setDecorationStyle(NameDecorationStyle style) { DecorationStyle = style;}
|
|
||||||
|
|
||||||
int getRAIndex() const { return ReturnAddrIndex; }
|
int getRAIndex() const { return ReturnAddrIndex; }
|
||||||
void setRAIndex(int Index) { ReturnAddrIndex = Index; }
|
void setRAIndex(int Index) { ReturnAddrIndex = Index; }
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
; RUN: llc < %s -mtriple=i386-unknown-mingw32 | \
|
; RUN: llc < %s -mtriple=i386-unknown-mingw32 | FileCheck %s
|
||||||
; RUN: grep {@12}
|
|
||||||
|
|
||||||
; Check that a fastcall function gets correct mangling
|
; Check that a fastcall function gets correct mangling
|
||||||
|
|
||||||
define x86_fastcallcc void @func(i64 %X, i8 %Y, i8 %G, i16 %Z) {
|
define x86_fastcallcc void @func(i64 %X, i8 %Y, i8 %G, i16 %Z) {
|
||||||
|
; CHECK: @func@20:
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user