mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
[ARMv8] Emit the proper .fpu directive.
Patch by Bradley Smith! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2c9d79beee
commit
8312905790
@ -807,8 +807,11 @@ void ARMAsmPrinter::emitAttributes() {
|
|||||||
|
|
||||||
if (Subtarget->hasNEON() && emitFPU) {
|
if (Subtarget->hasNEON() && emitFPU) {
|
||||||
/* NEON is not exactly a VFP architecture, but GAS emit one of
|
/* NEON is not exactly a VFP architecture, but GAS emit one of
|
||||||
* neon/neon-vfpv4/vfpv3/vfpv2 for .fpu parameters */
|
* neon/neon-fp-armv8/neon-vfpv4/vfpv3/vfpv2 for .fpu parameters */
|
||||||
if (Subtarget->hasVFP4())
|
if (Subtarget->hasV8FP())
|
||||||
|
AttrEmitter->EmitTextAttribute(ARMBuildAttrs::Advanced_SIMD_arch,
|
||||||
|
"neon-fp-armv8");
|
||||||
|
else if (Subtarget->hasVFP4())
|
||||||
AttrEmitter->EmitTextAttribute(ARMBuildAttrs::Advanced_SIMD_arch,
|
AttrEmitter->EmitTextAttribute(ARMBuildAttrs::Advanced_SIMD_arch,
|
||||||
"neon-vfpv4");
|
"neon-vfpv4");
|
||||||
else
|
else
|
||||||
@ -823,7 +826,7 @@ void ARMAsmPrinter::emitAttributes() {
|
|||||||
AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch,
|
AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch,
|
||||||
ARMBuildAttrs::AllowV8FPA);
|
ARMBuildAttrs::AllowV8FPA);
|
||||||
if (emitFPU)
|
if (emitFPU)
|
||||||
AttrEmitter->EmitTextAttribute(ARMBuildAttrs::VFP_arch, "v8fp");
|
AttrEmitter->EmitTextAttribute(ARMBuildAttrs::VFP_arch, "fp-armv8");
|
||||||
/* VFPv4 + .fpu */
|
/* VFPv4 + .fpu */
|
||||||
} else if (Subtarget->hasVFP4()) {
|
} else if (Subtarget->hasVFP4()) {
|
||||||
AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch,
|
AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
; RUN: llc < %s -mtriple=thumbv8-linux-gnueabi | FileCheck %s --check-prefix=Vt8
|
; RUN: llc < %s -mtriple=thumbv8-linux-gnueabi | FileCheck %s --check-prefix=Vt8
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+v8fp | FileCheck %s --check-prefix=V8-V8FP
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+v8fp | FileCheck %s --check-prefix=V8-V8FP
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+neon | FileCheck %s --check-prefix=V8-NEON
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+neon | FileCheck %s --check-prefix=V8-NEON
|
||||||
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+v8fp -mattr=+neon | FileCheck %s --check-prefix=V8-V8FP-NEON
|
||||||
; This tests that MC/asm header conversion is smooth
|
; This tests that MC/asm header conversion is smooth
|
||||||
;
|
;
|
||||||
; V7: .syntax unified
|
; V7: .syntax unified
|
||||||
@ -22,11 +23,17 @@
|
|||||||
; V8-V8FP: .syntax unified
|
; V8-V8FP: .syntax unified
|
||||||
; V8-V8FP: .eabi_attribute 6, 14
|
; V8-V8FP: .eabi_attribute 6, 14
|
||||||
; V8-V8FP: .eabi_attribute 10, 7
|
; V8-V8FP: .eabi_attribute 10, 7
|
||||||
|
; V8-V8FP: .fpu fp-armv8
|
||||||
|
|
||||||
; V8-NEON: .syntax unified
|
; V8-NEON: .syntax unified
|
||||||
; V8-NEON: .eabi_attribute 6, 14
|
; V8-NEON: .eabi_attribute 6, 14
|
||||||
; V8-NEON: .eabi_attribute 12, 3
|
; V8-NEON: .eabi_attribute 12, 3
|
||||||
|
|
||||||
|
; V8-V8FP-NEON: .syntax unified
|
||||||
|
; V8-V8FP-NEON: .eabi_attribute 6, 14
|
||||||
|
; V8-V8FP-NEON: .fpu neon-fp-armv8
|
||||||
|
; V8-V8FP-NEON: .eabi_attribute 10, 7
|
||||||
|
|
||||||
define i32 @f(i64 %z) {
|
define i32 @f(i64 %z) {
|
||||||
ret i32 0
|
ret i32 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user