From 048e16ff8f4f4524fbf545511ce46c63d0c6dc0e Mon Sep 17 00:00:00 2001 From: Lauro Ramos Venancio Date: Tue, 13 Feb 2007 19:52:28 +0000 Subject: Add ABI information to ARM subtarget. llvm-svn: 34245 --- llvm/lib/Target/ARM/ARMSubtarget.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp') diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index 27889c7818d..4363697d3e3 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -26,8 +26,9 @@ ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS) , HasVFP2(false) , UseThumbBacktraces(false) , IsR9Reserved(false) - , stackAlignment(8) - , TargetType(isELF) { // Default to ELF unless otherwise specified. + , stackAlignment(4) + , TargetType(isELF) // Default to ELF unless otherwise specified. + , TargetABI(ARM_ABI_APCS) { // Determine default and user specified characteristics std::string CPU = "generic"; @@ -49,9 +50,14 @@ ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS) #endif } + if (TT.find("eabi") != std::string::npos) + TargetABI = ARM_ABI_AAPCS; + + if (isAAPCS_ABI()) + stackAlignment = 8; + if (isTargetDarwin()) { UseThumbBacktraces = true; IsR9Reserved = true; - stackAlignment = 4; - } + } } -- cgit v1.2.3