Re: gcc and SIMD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




you can answer your questions yourself with a few Unix commands.
If you want to know where __builtin_X is defined, start with all files in which it is used:

find . -type f | xargs egrep -l __builtin_X [run from the top gcc directory]

if you suspect that something is architecture specific you can limit the search to your architecture of interest by replacing '.' with the correct directory.

But for the __builtin_* functions, you may end up with nothing: defined by the compiler means that GCC knows how to replace those calls with RTL (or maybe these days w/ higher level representations). So there's no function called __builtin_X. It is still likely that the __builtin_X names are mentioned somewhere in the code or comments around where the replacement happens.


On Mar 5, 2007, at 5:31 AM, ranjith kumar wrote:


--- Ian Lance Taylor <iant@xxxxxxxxxx> wrote:

ranjith kumar <ranjit_kumar_b4u@xxxxxxxxxxx> writes:

 1) Seems that all defintions for MMX, SSE and
SSE2
are deinred in mmtrin.h,xmmintrin.h and
emmintrin.h
header files respectively. Am I right?

Yes.

2) In those header files all functions call
_builtin_ia32_*. Where those functions(body) are
defined?

They are intrinsic functions automatically defined
by the compiler.
Please tell me in what file they are defined.


3) I thought that associated with each SIMD
instruction defined in Intel-ia-32-architectures
manual(Basic architecture) there is one function
defined in those header files.
But for some instructions no functions were
defined in
those header files.(For example MOVDQA
instruction)
Also those header files contain some more
functions
for which no SIMD assembly instruction
exist.Example
in emmintrin.h
static __inline __m128i
_mm_load_si128 (__m128i const *__P)
{
  return (__m128i) __builtin_ia32_loaddqa  ((char
const *)__P);
}
What could be the reason?

Those header files follow the implementation
described by Intel.
In which file they are described?
The thing is that I want to go into internals of it.
Thanks in advance.

Ian




		
___________________________________________________________
All New Yahoo! Mail – Tired of unwanted email come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux