Implement cfi_def_cfa_register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2010-12-29 00:26:06 +00:00
parent b790a17efb
commit b4601bd2ff
2 changed files with 49 additions and 0 deletions

View File

@ -186,6 +186,14 @@ bool MCStreamer::EmitCFIDefCfaOffset(int64_t Offset) {
bool MCStreamer::EmitCFIDefCfaRegister(int64_t Register) {
EnsureValidFrame();
MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
MCSymbol *Label = getContext().CreateTempSymbol();
EmitLabel(Label);
MachineLocation Dest(Register);
MachineLocation Source(MachineLocation::VirtualFP);
MCCFIInstruction Instruction(Label, Dest, Source);
CurFrame->Instructions.push_back(Instruction);
return false;
return false;
}