[llvm-commits] [llvm] r131572 - in /llvm/trunk: include/llvm/MC/MCStreamer.h lib/MC/MCAsmStreamer.cpp lib/MC/MCStreamer.cpp
Charles Davis
cdavis at mines.edu
Wed May 18 13:54:10 PDT 2011
Author: cdavis
Date: Wed May 18 15:54:10 2011
New Revision: 131572
URL: http://llvm.org/viewvc/llvm-project?rev=131572&view=rev
Log:
Add some more Win64 EH directives:
- StartChained and EndChained delimit a chained unwind area, which can contain
additional operations to be undone if an exception occurs inside of it.
- UnwindOnly declares that this function doesn't handle any exceptions. If it
has a handler, it's an unwind handler instead of an exception handler.
- Lsda declares the location and size of the LSDA, which in the Win64 EH
scheme is kept inside the UNWIND_INFO struct. Windows itself ignores the
LSDA; it's used by the Language-Specific Handler (the "Personality Function"
from DWARF).
Modified:
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/lib/MC/MCStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=131572&r1=131571&r2=131572&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Wed May 18 15:54:10 2011
@@ -459,6 +459,10 @@
virtual void EmitWin64EHStartProc(MCSymbol *Symbol, MCSymbol *EHandler = 0);
virtual void EmitWin64EHEndProc();
+ virtual void EmitWin64EHStartChained();
+ virtual void EmitWin64EHEndChained();
+ virtual void EmitWin64EHUnwindOnly();
+ virtual void EmitWin64EHLsda(const MCSymbol *Sym, int64_t Size);
virtual void EmitWin64EHPushReg(int64_t Register);
virtual void EmitWin64EHSetFrame(int64_t Register, int64_t Offset);
virtual void EmitWin64EHAllocStack(int64_t Size);
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=131572&r1=131571&r2=131572&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed May 18 15:54:10 2011
@@ -210,6 +210,10 @@
virtual void EmitWin64EHStartProc(MCSymbol *Symbol, MCSymbol *EHandler = 0);
virtual void EmitWin64EHEndProc();
+ virtual void EmitWin64EHStartChained();
+ virtual void EmitWin64EHEndChained();
+ virtual void EmitWin64EHUnwindOnly();
+ virtual void EmitWin64EHLsda(cosnt MCSymbol *Sym, int64_t Size);
virtual void EmitWin64EHPushReg(int64_t Register);
virtual void EmitWin64EHSetFrame(int64_t Register, int64_t Offset);
virtual void EmitWin64EHAllocStack(int64_t Size);
@@ -942,6 +946,38 @@
EmitEOL();
}
+void MCAsmStreamer::EmitWin64EHStartChained()
+{
+ //MCStreamer::EmitWin64EHStartChained();
+
+ OS << "\t.w64_startchained";
+ EmitEOL();
+}
+
+void MCAsmStreamer::EmitWin64EHEndChained()
+{
+ //MCStreamer::EmitWin64EHEndChained();
+
+ OS << "\t.w64_endchained";
+ EmitEOL();
+}
+
+void MCAsmStreamer::EmitWin64EHUnwindOnly()
+{
+ //MCStreamer::EmitWin64EHUnwindOnly();
+
+ OS << "\t.w64_unwind_only";
+ EmitEOL();
+}
+
+void MCAsmStreamer::EmitWin64EHLsda(cosnt MCSymbol *Sym, int64_t Size)
+{
+ //MCStreamer::EmitWin64EHLsda(Sym, Size);
+
+ OS << "\t.w64_lsda " << *Sym << ", " << Size;
+ EmitEOL();
+}
+
void MCAsmStreamer::EmitWin64EHPushReg(int64_t Register)
{
//MCStreamer::EmitWin64EHPushReg(Register);
Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=131572&r1=131571&r2=131572&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Wed May 18 15:54:10 2011
@@ -322,6 +322,30 @@
abort();
}
+void MCStreamer::EmitWin64EHStartChained()
+{
+ errs() << "Not implemented yet\n";
+ abort();
+}
+
+void MCStreamer::EmitWin64EHEndChained()
+{
+ errs() << "Not implemented yet\n";
+ abort();
+}
+
+void MCStreamer::EmitWin64EHUnwindOnly()
+{
+ errs() << "Not implemented yet\n";
+ abort();
+}
+
+void MCStreamer::EmitWin64EHLsda(const MCSymbol *Sym, int64_t Size)
+{
+ errs() << "Not implemented yet\n";
+ abort();
+}
+
void MCStreamer::EmitWin64EHPushReg(int64_t Register)
{
errs() << "Not implemented yet\n";
More information about the llvm-commits
mailing list