* How to use VFP instructions on ARM
@ 2008-01-08 7:09 Tom Cooksey
2008-01-17 2:14 ` Dorit Nuzman
0 siblings, 1 reply; 2+ messages in thread
From: Tom Cooksey @ 2008-01-08 7:09 UTC (permalink / raw)
To: gcc-help
Hi,
Please forgive this post but I've tried the archives & google and am unable to
find much info on gcc & ARM's VFP instruction set. I have a few questions:
1) How is the VFP coprocessor utilised by GCC when compiling
with -mfpu=vfp -mfloat-abi=softfp? Will GCC emit vfp instructions for doing
regular (scalor) floating point operations? I.e. will "float a =3.14; a *=
20.0;" be done by the coprocessor?
2) How should I use the VFP instructions in my own code? I beleive there are
GCC macros for using SSE instructions, is there anything similar for ARM VFP?
(A quick traul through my GCC sources say no, but I may have missed
something.) If not, can I use inline assembly instead and are the mnemonics
and syntax the same as described in the ARM Architecture Reference Manual?
3) Does the GCC -ftree-vectorize work with VFP?
4) Is there a better place to look for this information? :-)
Cheers,
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to use VFP instructions on ARM
2008-01-08 7:09 How to use VFP instructions on ARM Tom Cooksey
@ 2008-01-17 2:14 ` Dorit Nuzman
0 siblings, 0 replies; 2+ messages in thread
From: Dorit Nuzman @ 2008-01-17 2:14 UTC (permalink / raw)
To: Tom Cooksey; +Cc: gcc-help
> Hi,
>
> Please forgive this post but I've tried the archives & google and
amunable to
> find much info on gcc & ARM's VFP instruction set. I have a few
questions:
>
> 1) How is the VFP coprocessor utilised by GCC when compiling
> with -mfpu=vfp -mfloat-abi=softfp? Will GCC emit vfp instructions for
doing
> regular (scalor) floating point operations? I.e. will "float a =3.14; a
*=
> 20.0;" be done by the coprocessor?
>
> 2) How should I use the VFP instructions in my own code? I beleive there
are
> GCC macros for using SSE instructions, is there anything similar forARM
VFP?
> (A quick traul through my GCC sources say no, but I may have missed
> something.) If not, can I use inline assembly instead and are the
mnemonics
> and syntax the same as described in the ARM Architecture Reference
Manual?
>
> 3) Does the GCC -ftree-vectorize work with VFP?
>
I don't know, but I guess you could try compiling a testcase with a simple
loop using
-mfpu=vfp -mfloat-abi=softfp -ftree-vectorize -ftree-vectorizer-verbose=#
and see what it says (it will report if it wasn't able to vectorize, and
why).
(The bare minimum to enable vectorization for the target is to define
UNITS_PER_SIMD_WORD to the size in bytes of the vector registers available
under TARGET_VFP in the arm port. I'm not so familiar with this port; the
closest thing I see in arm/arm.h is this:
/* Use the option -mvectorize-with-neon-quad to override the use of
doubleword
registers when autovectorizing for Neon, at least until multiple vector
widths are supported properly by the middle-end. */
#define UNITS_PER_SIMD_WORD \
(TARGET_NEON ? (TARGET_NEON_VECTORIZE_QUAD ? 16 : 8) : UNITS_PER_WORD)
)
dorit
> 4) Is there a better place to look for this information? :-)
>
>
>
> Cheers,
>
> Tom
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-16 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-08 7:09 How to use VFP instructions on ARM Tom Cooksey
2008-01-17 2:14 ` Dorit Nuzman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).