mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Remove some uneeded pseudos in the presence of the naked function attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181072 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -249,12 +249,18 @@ void MipsAsmPrinter::EmitFunctionEntryLabel() {
|
||||
void MipsAsmPrinter::EmitFunctionBodyStart() {
|
||||
MCInstLowering.Initialize(Mang, &MF->getContext());
|
||||
|
||||
emitFrameDirective();
|
||||
bool IsNakedFunction =
|
||||
MF->getFunction()->
|
||||
getAttributes().hasAttribute(AttributeSet::FunctionIndex,
|
||||
Attribute::Naked);
|
||||
if (!IsNakedFunction)
|
||||
emitFrameDirective();
|
||||
|
||||
if (OutStreamer.hasRawTextSupport()) {
|
||||
SmallString<128> Str;
|
||||
raw_svector_ostream OS(Str);
|
||||
printSavedRegsBitmask(OS);
|
||||
if (!IsNakedFunction)
|
||||
printSavedRegsBitmask(OS);
|
||||
OutStreamer.EmitRawText(OS.str());
|
||||
if (!Subtarget->inMips16Mode()) {
|
||||
OutStreamer.EmitRawText(StringRef("\t.set\tnoreorder"));
|
||||
|
Reference in New Issue
Block a user