mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 16:37:42 +00:00
[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
This commit is contained in:
parent
d2f8df50fb
commit
fc3dc102e0
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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: }
|
||||
|
Loading…
Reference in New Issue
Block a user