From b5c5df48b2dd9773149374d32fb40d12471269d4 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 7 Sep 2007 14:52:14 +0000 Subject: Add support for having different alignment for objects on call frames. The x86-64 ABI states that objects passed on the stack have 8 byte alignment. Implement that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41768 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetData.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h index 6003e60..f2e55f1 100644 --- a/include/llvm/Target/TargetData.h +++ b/include/llvm/Target/TargetData.h @@ -38,7 +38,8 @@ enum AlignTypeEnum { INTEGER_ALIGN = 'i', ///< Integer type alignment VECTOR_ALIGN = 'v', ///< Vector type alignment FLOAT_ALIGN = 'f', ///< Floating point type alignment - AGGREGATE_ALIGN = 'a' ///< Aggregate alignment + AGGREGATE_ALIGN = 'a', ///< Aggregate alignment + STACK_ALIGN = 's' ///< Stack objects alignment }; /// Target alignment element. /// @@ -166,6 +167,11 @@ public: /// specified type. unsigned char getABITypeAlignment(const Type *Ty) const; + /// getCallFrameTypeAlignment - Return the minimum ABI-required alignment + /// for the specified type when it is part of a call frame. + unsigned char getCallFrameTypeAlignment(const Type *Ty) const; + + /// getPrefTypeAlignment - Return the preferred stack/global alignment for /// the specified type. unsigned char getPrefTypeAlignment(const Type *Ty) const; -- cgit v1.1