[llvm-commits] [llvm] r80024 - in /llvm/trunk: include/llvm/MC/MCAsmInfo.h lib/MC/MCAsmInfo.cpp lib/MC/MCAsmInfoDarwin.cpp

Chris Lattner clattner at apple.com
Tue Aug 25 14:13:34 PDT 2009


On Aug 25, 2009, at 1:21 PM, Bill Wendling wrote:

> Author: void
> Date: Tue Aug 25 15:21:17 2009
> New Revision: 80024
>
> URL: http://llvm.org/viewvc/llvm-project?rev=80024&view=rev
> Log:
> Add a target asm info hook to specify that particular bits of data  
> in the FDE
> should be forced to 32-bits (.long) even on 64-bit architectures.  
> Darwin wants
> these bits to be 64-bits (.quad). However, other platforms may  
> disagree.
>
> This is just the info right now and is part of a work-in-progress  
> which needs
> this. We'll add the actual *use* of this soon.

hi Bill,

Does this really make sense to go into MCAsmInfo.h?  MCAsmInfo.h is  
(not currently, but intended to be) *just* about the syntax and  
capabilities of the .s files.  A lot of the "this is how eh gets  
lowered" stuff should go into TargetLowering.  What do you think?

-Chris

> Modified:
>    llvm/trunk/include/llvm/MC/MCAsmInfo.h
>    llvm/trunk/lib/MC/MCAsmInfo.cpp
>    llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
>
> Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=80024&r1=80023&r2=80024&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
> +++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Tue Aug 25 15:21:17 2009
> @@ -254,52 +254,49 @@
>     //===--- Dwarf Emission Directives  
> -----------------------------------===//
>
>     /// AbsoluteDebugSectionOffsets - True if we should emit abolute  
> section
> -    /// offsets for debug information. Defaults to false.
> -    bool AbsoluteDebugSectionOffsets;
> +    /// offsets for debug information.
> +    bool AbsoluteDebugSectionOffsets;        // Defaults to false.
>
>     /// AbsoluteEHSectionOffsets - True if we should emit abolute  
> section
>     /// offsets for EH information. Defaults to false.
>     bool AbsoluteEHSectionOffsets;
>
>     /// HasLEB128 - True if target asm supports leb128 directives.
> -    ///
> -    bool HasLEB128; // Defaults to false.
> +    bool HasLEB128;                          // Defaults to false.
>
>     /// hasDotLocAndDotFile - True if target asm supports .loc  
> and .file
>     /// directives for emitting debugging information.
> -    ///
> -    bool HasDotLocAndDotFile; // Defaults to false.
> +    bool HasDotLocAndDotFile;                // Defaults to false.
>
>     /// SupportsDebugInformation - True if target supports emission  
> of debugging
>     /// information.
> -    bool SupportsDebugInformation;
> +    bool SupportsDebugInformation;           // Defaults to false.
>
> -    /// SupportsExceptionHandling - True if target supports
> -    /// exception handling.
> -    ///
> -    // Defaults to None
> -    ExceptionHandling::ExceptionsType ExceptionsType;
> +    /// SupportsExceptionHandling - True if target supports  
> exception handling.
> +    ExceptionHandling::ExceptionsType ExceptionsType; // Defaults  
> to None
>
>     /// RequiresFrameSection - true if the Dwarf2 output needs a  
> frame section
> -    ///
> -    bool DwarfRequiresFrameSection; // Defaults to true.
> +    bool DwarfRequiresFrameSection;          // Defaults to true.
>
>     /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection  
> is used to
>     /// encode inline subroutine information.
> -    bool DwarfUsesInlineInfoSection; // Defaults to false.
> +    bool DwarfUsesInlineInfoSection;         // Defaults to false.
>
>     /// Is_EHSymbolPrivate - If set, the "_foo.eh" is made private  
> so that it
>     /// doesn't show up in the symbol table of the object file.
> -    bool Is_EHSymbolPrivate;                // Defaults to true.
> +    bool Is_EHSymbolPrivate;                 // Defaults to true.
> +
> +    /// ForceEncodingOfFDETo32Bits - If set, the encoding of some  
> of the FDE
> +    /// data is forced to 32-bit.
> +    bool ForceEncodingOfFDETo32Bits;         // Defaults to true.
>
>     /// GlobalEHDirective - This is the directive used to make  
> exception frame
>     /// tables globally visible.
> -    ///
> -    const char *GlobalEHDirective;          // Defaults to NULL.
> +    const char *GlobalEHDirective;           // Defaults to NULL.
>
>     /// SupportsWeakEmptyEHFrame - True if target assembler and  
> linker will
>     /// handle a weak_definition of constant 0 for an omitted EH  
> frame.
> -    bool SupportsWeakOmittedEHFrame;  // Defaults to true.
> +    bool SupportsWeakOmittedEHFrame;         // Defaults to true.
>
>     /// DwarfSectionOffsetDirective - Special section offset  
> directive.
>     const char* DwarfSectionOffsetDirective; // Defaults to NULL
> @@ -508,6 +505,9 @@
>     bool is_EHSymbolPrivate() const {
>       return Is_EHSymbolPrivate;
>     }
> +    bool forceEncodingOfFDETo32Bits() const {
> +      return ForceEncodingOfFDETo32Bits;
> +    }
>     const char *getGlobalEHDirective() const {
>       return GlobalEHDirective;
>     }
>
> Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=80024&r1=80023&r2=80024&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/MC/MCAsmInfo.cpp Tue Aug 25 15:21:17 2009
> @@ -78,6 +78,7 @@
>   DwarfRequiresFrameSection = true;
>   DwarfUsesInlineInfoSection = false;
>   Is_EHSymbolPrivate = true;
> +  ForceEncodingOfFDETo32Bits = true;
>   GlobalEHDirective = 0;
>   SupportsWeakOmittedEHFrame = true;
>   DwarfSectionOffsetDirective = 0;
>
> Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=80024&r1=80023&r2=80024&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
> +++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Tue Aug 25 15:21:17 2009
> @@ -52,6 +52,7 @@
>   // doesn't hurt anything.
>   // FIXME: I need to get this from Triple.
>   Is_EHSymbolPrivate = false;
> +  ForceEncodingOfFDETo32Bits = false;
>   GlobalEHDirective = "\t.globl\t";
>   SupportsWeakOmittedEHFrame = false;
>
>
>
> _______________________________________________
> 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