mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Implement .cfi_remember_state and .cfi_restore_state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122602 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -179,8 +179,8 @@ bool MCStreamer::EmitCFIDefCfaOffset(int64_t Offset) {
|
||||
EmitLabel(Label);
|
||||
MachineLocation Dest(MachineLocation::VirtualFP);
|
||||
MachineLocation Source(MachineLocation::VirtualFP, -Offset);
|
||||
MachineMove Move(Label, Dest, Source);
|
||||
CurFrame->Moves.push_back(Move);
|
||||
MCCFIInstruction Instruction(Label, Dest, Source);
|
||||
CurFrame->Instructions.push_back(Instruction);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -211,6 +211,27 @@ bool MCStreamer::EmitCFILsda(const MCSymbol *Sym, unsigned Encoding) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCStreamer::EmitCFIRememberState() {
|
||||
EnsureValidFrame();
|
||||
MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
EmitLabel(Label);
|
||||
MCCFIInstruction Instruction(MCCFIInstruction::Remember, Label);
|
||||
CurFrame->Instructions.push_back(Instruction);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCStreamer::EmitCFIRestoreState() {
|
||||
// FIXME: Error if there is no matching cfi_remember_state.
|
||||
EnsureValidFrame();
|
||||
MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
EmitLabel(Label);
|
||||
MCCFIInstruction Instruction(MCCFIInstruction::Restore, Label);
|
||||
CurFrame->Instructions.push_back(Instruction);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// EmitRawText - If this file is backed by an assembly streamer, this dumps
|
||||
/// the specified string in the output .s file. This capability is
|
||||
/// indicated by the hasRawTextSupport() predicate.
|
||||
|
Reference in New Issue
Block a user