[llvm-commits] [llvm] r96637 - in /llvm/trunk: include/llvm/CodeGen/TargetLoweringObjectFileImpl.h lib/CodeGen/TargetLoweringObjectFileImpl.cpp lib/Target/X86/X86TargetObjectFile.cpp lib/Target/X86/X86TargetObjectFile.h
Bob Wilson
bob.wilson at apple.com
Fri Feb 19 09:17:43 PST 2010
I've reverted this patch because it broke a lot of tests for our arm nightly testers.
The assembler would not accept the llc output because of subtract expressions with undefined symbols. Here is a diff of the good and bad assembly produced for SingleSource/Regression/C++/EH/throw_rethrow_test:
--- throw_rethrow_test.llc.s 2010-02-19 09:08:59.000000000 -0800
+++ throw_rethrow_test.llc.s.bad 2010-02-19 08:28:10.000000000 -0800
@@ -249,7 +249,7 @@
Lexception2:
L_LSDA_2:
.byte 255
- .byte 0
+ .byte 155
.byte 34
.byte 3
.byte 8
@@ -281,8 +281,8 @@
.byte 3
.byte 125
- .long __ZTI3foo
- .long __ZTIi
+ .long L__ZTI3foo$non_lazy_ptr-.
+ .long L__ZTIi$non_lazy_ptr-.
.long 0x0
.byte 0
The "L__ZTI3foo$non_lazy_ptr" symbol is not defined.
On Feb 18, 2010, at 4:29 PM, Anton Korobeynikov wrote:
> Author: asl
> Date: Thu Feb 18 18:29:36 2010
> New Revision: 96637
>
> URL: http://llvm.org/viewvc/llvm-project?rev=96637&view=rev
> Log:
> Use the same encoding for EH stuff uniformly on all MachO targets.
> This hopefulyl should unbreak EH on PPC/Darwin.
>
> Modified:
> llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
> llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
> llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
> llvm/trunk/lib/Target/X86/X86TargetObjectFile.h
>
> Modified: llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h?rev=96637&r1=96636&r2=96637&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h Thu Feb 18 18:29:36 2010
> @@ -171,6 +171,11 @@
> virtual const MCExpr *
> getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
> MachineModuleInfo *MMI, unsigned Encoding) const;
> +
> + virtual unsigned getPersonalityEncoding() const;
> + virtual unsigned getLSDAEncoding() const;
> + virtual unsigned getFDEEncoding() const;
> + virtual unsigned getTTypeEncoding() const;
> };
>
>
>
> Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=96637&r1=96636&r2=96637&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
> +++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Thu Feb 18 18:29:36 2010
> @@ -33,6 +33,7 @@
> #include "llvm/ADT/SmallString.h"
> #include "llvm/ADT/StringExtras.h"
> using namespace llvm;
> +using namespace dwarf;
>
> //===----------------------------------------------------------------------===//
> // ELF
> @@ -754,6 +755,22 @@
> }
>
>
> +unsigned TargetLoweringObjectFileMachO::getPersonalityEncoding() const {
> + return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
> +}
> +
> +unsigned TargetLoweringObjectFileMachO::getLSDAEncoding() const {
> + return DW_EH_PE_pcrel;
> +}
> +
> +unsigned TargetLoweringObjectFileMachO::getFDEEncoding() const {
> + return DW_EH_PE_pcrel;
> +}
> +
> +unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const {
> + return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
> +}
> +
> //===----------------------------------------------------------------------===//
> // COFF
> //===----------------------------------------------------------------------===//
>
> Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp?rev=96637&r1=96636&r2=96637&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Thu Feb 18 18:29:36 2010
> @@ -148,35 +148,3 @@
>
> return DW_EH_PE_absptr;
> }
> -
> -unsigned X8632_MachoTargetObjectFile::getPersonalityEncoding() const {
> - return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
> -}
> -
> -unsigned X8632_MachoTargetObjectFile::getLSDAEncoding() const {
> - return DW_EH_PE_pcrel;
> -}
> -
> -unsigned X8632_MachoTargetObjectFile::getFDEEncoding() const {
> - return DW_EH_PE_pcrel;
> -}
> -
> -unsigned X8632_MachoTargetObjectFile::getTTypeEncoding() const {
> - return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
> -}
> -
> -unsigned X8664_MachoTargetObjectFile::getPersonalityEncoding() const {
> - return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
> -}
> -
> -unsigned X8664_MachoTargetObjectFile::getLSDAEncoding() const {
> - return DW_EH_PE_pcrel;
> -}
> -
> -unsigned X8664_MachoTargetObjectFile::getFDEEncoding() const {
> - return DW_EH_PE_pcrel;
> -}
> -
> -unsigned X8664_MachoTargetObjectFile::getTTypeEncoding() const {
> - return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
> -}
>
> Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.h?rev=96637&r1=96636&r2=96637&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86TargetObjectFile.h (original)
> +++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.h Thu Feb 18 18:29:36 2010
> @@ -25,10 +25,6 @@
> virtual const MCExpr *
> getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
> MachineModuleInfo *MMI, unsigned Encoding) const;
> - virtual unsigned getPersonalityEncoding() const;
> - virtual unsigned getLSDAEncoding() const;
> - virtual unsigned getFDEEncoding() const;
> - virtual unsigned getTTypeEncoding() const;
> };
>
> /// X8664_MachoTargetObjectFile - This TLOF implementation is used for
> @@ -39,10 +35,6 @@
> virtual const MCExpr *
> getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
> MachineModuleInfo *MMI, unsigned Encoding) const;
> - virtual unsigned getPersonalityEncoding() const;
> - virtual unsigned getLSDAEncoding() const;
> - virtual unsigned getFDEEncoding() const;
> - virtual unsigned getTTypeEncoding() const;
> };
>
> class X8632_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list