[llvm-commits] [llvm] r41385 - /llvm/trunk/lib/CodeGen/DwarfWriter.cpp
Bill Wendling
isanbard at gmail.com
Fri Aug 24 17:51:55 PDT 2007
Author: void
Date: Fri Aug 24 19:51:55 2007
New Revision: 41385
URL: http://llvm.org/viewvc/llvm-project?rev=41385&view=rev
Log:
The personality function might need to be declared as:
.set Lset0,___gxx_personality_v0-.
.long Lset0
on some targets. Make it so!
Modified:
llvm/trunk/lib/CodeGen/DwarfWriter.cpp
Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=41385&r1=41384&r2=41385&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Fri Aug 24 19:51:55 2007
@@ -2803,11 +2803,24 @@
Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4);
Asm->EOL("Personality (pcrel sdata4)");
- O << TAI->getData32bitsDirective();
- Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
- O << "-" << TAI->getPCSymbol();
- Asm->EOL("Personality");
-
+ if (TAI->needsSet()) {
+ O << "\t.set\t";
+ PrintLabelName("set", SetCounter);
+ O << ",";
+ Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
+ O << "-" << TAI->getPCSymbol();
+ Asm->EOL("Set Personality");
+ O << TAI->getData32bitsDirective();
+ PrintLabelName("set", SetCounter);
+ Asm->EOL("Personality");
+ ++SetCounter;
+ } else {
+ O << TAI->getData32bitsDirective();
+ Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
+ O << "-" << TAI->getPCSymbol();
+ Asm->EOL("Personality");
+ }
+
Asm->EmitULEB128Bytes(DW_EH_PE_pcrel);
Asm->EOL("LSDA Encoding (pcrel)");
Asm->EmitULEB128Bytes(DW_EH_PE_pcrel);
More information about the llvm-commits
mailing list