[llvm-commits] [llvm] r129571 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DwarfCFIException.cpp lib/Target/TargetLoweringObjectFile.cpp lib/Target/X86/X86FrameLowering.cpp lib/T
Anton Korobeynikov
anton at korobeynikov.info
Fri Apr 15 09:14:22 PDT 2011
Hi Rafael,
> + const MachineLocation &Dst = Move->getDestination();
> + const MachineLocation &Src = Move->getSource();
> + const TargetAsmInfo &AsmInfo = OutContext.getTargetAsmInfo();
> + if (Dst.isReg() && Dst.getReg() == MachineLocation::VirtualFP) {
> + if (Src.getReg() == MachineLocation::VirtualFP)
> + OutStreamer.EmitCFIDefCfaOffset(-Src.getOffset());
> + else {
> + unsigned Reg = AsmInfo.getDwarfRegNum(Src.getReg(), true);
> + OutStreamer.EmitCFIDefCfa(Reg, -Src.getOffset());
> + }
> + } else if (Src.isReg() && Src.getReg() == MachineLocation::VirtualFP) {
> + unsigned Reg = AsmInfo.getDwarfRegNum(Dst.getReg(), true);
> + OutStreamer.EmitCFIDefCfaRegister(Reg);
> + } else {
> + unsigned Reg = AsmInfo.getDwarfRegNum(Src.getReg(), true);
> + OutStreamer.EmitCFIOffset(Reg, -Dst.getOffset());
> + }
This code is part of AsmPrinter::EmitCFIFrameMoves(). Please use it.
> - // Indicate locations of general callee saved registers in frame.
> - std::vector<MachineMove> Moves;
> - TFL->getInitialFrameState(Moves);
> - Asm->EmitCFIFrameMoves(Moves);
> - Asm->EmitCFIFrameMoves(MMI->getFrameMoves());
Why? Even more, it seems like you're not emitting common frame moves at all!
> Removed: llvm/trunk/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll?rev=129570&view=auto
> ==============================================================================
> --- llvm/trunk/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll (removed)
> @@ -1,12 +0,0 @@
> -; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu | grep ^.L_Z1fv.eh
> -; RUN: llc < %s -march=x86 -mtriple=i686-unknown-linux-gnu | grep ^.L_Z1fv.eh
> -; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin9 | grep ^__Z1fv.eh
> -; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 | grep ^__Z1fv.eh
I don't think you're wanting to do this. At least darwin part.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list