aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmara Emerson <amara.emerson@arm.com>2013-10-11 16:03:43 +0000
committerAmara Emerson <amara.emerson@arm.com>2013-10-11 16:03:43 +0000
commitfc3dc102e0bef8ecb7cd13ceab77dc130175f792 (patch)
tree49f7be1b4c22130fc70be7b2301317382de6cd94
parentd2f8df50fbd2d91cc9f9e4c6b9c4b65304e710c1 (diff)
downloadexternal_llvm-fc3dc102e0bef8ecb7cd13ceab77dc130175f792.zip
external_llvm-fc3dc102e0bef8ecb7cd13ceab77dc130175f792.tar.gz
external_llvm-fc3dc102e0bef8ecb7cd13ceab77dc130175f792.tar.bz2
[ARM] Fix FP ABI attributes with no VFP enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192458 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp26
-rw-r--r--test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll5
-rw-r--r--test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll6
-rw-r--r--test/MC/ARM/xscale-attributes.ll8
4 files changed, 19 insertions, 26 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index ed235f6..4899a5d 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -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);
diff --git a/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll b/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll
index c86028d..2a31703 100644
--- a/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll
+++ b/test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll
@@ -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
diff --git a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
index 50dbaac..0924691 100644
--- a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
+++ b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
@@ -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
diff --git a/test/MC/ARM/xscale-attributes.ll b/test/MC/ARM/xscale-attributes.ll
index 64b4f8e..718fd8f 100644
--- a/test/MC/ARM/xscale-attributes.ll
+++ b/test/MC/ARM/xscale-attributes.ll
@@ -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: }