[llvm] r192458 - [ARM] Fix FP ABI attributes with no VFP enabled.
Amara Emerson
amara.emerson at arm.com
Fri Oct 11 09:03:44 PDT 2013
Author: aemerson
Date: Fri Oct 11 11:03:43 2013
New Revision: 192458
URL: http://llvm.org/viewvc/llvm-project?rev=192458&view=rev
Log:
[ARM] Fix FP ABI attributes with no VFP enabled.
Modified:
llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/trunk/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll
llvm/trunk/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
llvm/trunk/test/MC/ARM/xscale-attributes.ll
Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=192458&r1=192457&r2=192458&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Fri Oct 11 11:03:43 2013
@@ -876,22 +876,20 @@ void ARMAsmPrinter::emitAttributes() {
}
// Signal various FP modes.
- if (Subtarget->hasVFP2()) {
- if (!TM.Options.UnsafeFPMath) {
- AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_denormal,
- ARMBuildAttrs::Allowed);
- AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_exceptions,
- ARMBuildAttrs::Allowed);
- }
-
- if (TM.Options.NoInfsFPMath && TM.Options.NoNaNsFPMath)
- AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_number_model,
- ARMBuildAttrs::Allowed);
- else
- AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_number_model,
- ARMBuildAttrs::AllowIEE754);
+ if (!TM.Options.UnsafeFPMath) {
+ AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_denormal,
+ ARMBuildAttrs::Allowed);
+ AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_exceptions,
+ ARMBuildAttrs::Allowed);
}
+ if (TM.Options.NoInfsFPMath && TM.Options.NoNaNsFPMath)
+ AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_number_model,
+ ARMBuildAttrs::Allowed);
+ else
+ AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_FP_number_model,
+ ARMBuildAttrs::AllowIEE754);
+
// FIXME: add more flags to ARMBuildAttrs.h
// 8-bytes alignment stuff.
AttrEmitter->EmitAttribute(ARMBuildAttrs::ABI_align8_needed, 1);
Modified: llvm/trunk/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll?rev=192458&r1=192457&r2=192458&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll Fri Oct 11 11:03:43 2013
@@ -9,7 +9,6 @@
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+neon | FileCheck %s --check-prefix=V8-NEON
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+fp-armv8 -mattr=+neon | FileCheck %s --check-prefix=V8-FPARMv8-NEON
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+fp-armv8,+neon,+crypto | FileCheck %s --check-prefix=V8-FPARMv8-NEON-CRYPTO
-; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mattr=-neon,-vfp2 | FileCheck %s --check-prefix=NOFP
; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a9 | FileCheck %s --check-prefix=CORTEX-A9
; RUN: llc < %s -mtriple=thumbv6m-linux-gnueabi -mcpu=cortex-m0 | FileCheck %s --check-prefix=CORTEX-M0
; RUN: llc < %s -mtriple=thumbv7m-linux-gnueabi -mcpu=cortex-m4 | FileCheck %s --check-prefix=CORTEX-M4
@@ -86,10 +85,6 @@
; V8-FPARMv8-NEON-CRYPTO: .eabi_attribute 10, 7
; V8-FPARMv8-NEON-CRYPTO: .eabi_attribute 12, 3
-; NOFP-NOT: .eabi_attribute 20
-; NOFP-NOT: .eabi_attribute 21
-; NOFP-NOT: .eabi_attribute 23
-
; CORTEX-A9: .cpu cortex-a9
; CORTEX-A9: .eabi_attribute 6, 10
; CORTEX-A9: .eabi_attribute 7, 65
Modified: llvm/trunk/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll?rev=192458&r1=192457&r2=192458&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll Fri Oct 11 11:03:43 2013
@@ -15,14 +15,14 @@
; BASIC-NEXT: ]
; BASIC-NEXT: Address: 0x0
; BASIC-NEXT: Offset: 0x3C
-; BASIC-NEXT: Size: 24
+; BASIC-NEXT: Size: 30
; BASIC-NEXT: Link: 0
; BASIC-NEXT: Info: 0
; BASIC-NEXT: AddressAlignment: 1
; BASIC-NEXT: EntrySize: 0
; BASIC-NEXT: SectionData (
-; BASIC-NEXT: 0000: 41170000 00616561 62690001 0D000000
-; BASIC-NEXT: 0010: 06010801 18011901
+; BASIC-NEXT: 0000: 411D0000 00616561 62690001 13000000
+; BASIC-NEXT: 0010: 06010801 14011501 17031801 1901
; BASIC-NEXT: )
; CORTEXA8: Name: .ARM.attributes
Modified: llvm/trunk/test/MC/ARM/xscale-attributes.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/xscale-attributes.ll?rev=192458&r1=192457&r2=192458&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/xscale-attributes.ll (original)
+++ llvm/trunk/test/MC/ARM/xscale-attributes.ll Fri Oct 11 11:03:43 2013
@@ -26,14 +26,14 @@ entry:
; OBJ-NEXT: ]
; OBJ-NEXT: Address: 0x0
; OBJ-NEXT: Offset: 0x38
-; OBJ-NEXT: Size: 34
+; OBJ-NEXT: Size: 40
; OBJ-NEXT: Link: 0
; OBJ-NEXT: Info: 0
; OBJ-NEXT: AddressAlignment: 1
; OBJ-NEXT: EntrySize: 0
; OBJ-NEXT: SectionData (
-; OBJ-NEXT: 0000: 41210000 00616561 62690001 17000000
-; OBJ-NEXT: 0010: 05585343 414C4500 06050801 09011801
-; OBJ-NEXT: 0020: 1901
+; OBJ-NEXT: 0000: 41270000 00616561 62690001 1D000000
+; OBJ-NEXT: 0010: 05585343 414C4500 06050801 09011401
+; OBJ-NEXT: 0020: 15011703 18011901
; OBJ-NEXT: )
; OBJ-NEXT: }
More information about the llvm-commits
mailing list