This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
GAS .fpu directive
- From: Renato Golin <renato dot golin at linaro dot org>
- To: binutils at sourceware dot org
- Date: Thu, 14 Aug 2014 19:54:54 +0100
- Subject: GAS .fpu directive
- Authentication-results: sourceware.org; auth=none
Folks,
We seem to be hitting some bugs on the .fpu directive in ARM assembly
files, and I'd like to ask you guys about a seemingly undocumented
behaviour.
It seems GAS accepts .fpu anywhere in the file, and the meaning is
that it can change the FPU type mid-way through an assembly file, or
even in a block. For example:
.fpu vfp
vmov.i64 d0, #0 @ selected FPU does not support instruction
.fpu neon
vmov.i64 d0, #1 @ ok
.fpu vfp
vmov.i64 d0, #2 @ selected FPU does not support instruction
Is that intentional? Is there any real usage for this kind of thing?
I naively assumed that .cpu / .fpu were like .eabi_attribute flags
that would tell what the *file* is, because normally one assembly
won't run on different machines at the same time.
The only use case I can think of is if there is a conditional jump
based on the existence of instructions, so a block that has neon is
only executed if there's no exception, but that still doesn't need a
.fpu vfp somewhere else.
cheers,
--renato