This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I've been doing a fair amount of linux coding for a
web server, the last few weeks, and recently I ran across a linker error
claiming an unresolved reference to memset. Most of the link errors were
my fault, but I was simply shocked. The fact that memset was unresolved,
implied that memset isn't a compiler intrinsic. I mean, if strcpy is
an intrinsic, why the hell isn't memset. (I'm using a semi-old version
(egcs-2.91.66), so it might be an intrinsic in newer versions.)
Which got me to thinking, now that I am free from
relying on VC 6+, and the compiler is open sourced, I can finally add my
own compiler intrinsics. Things like bsf (bit scan forward), or maybe
a simple hash function.
Currently for quick and dirty asm functions, I
typically use an __attribute__((regparm(x))) style of function, but an
intrinsic would be so much cleaner.
Now the big question is where to start. I did
a little digging through the egcs release, and binutils, and I can't seem to see
where intrinsics like strcpy get processed by the compiler. I did my
traditional web search to pick up any info on doing this, talked to all the
linux coders I know, but I haven't been able to find a thing.
Any help, or further guidance, direction pointing,
examples, the source file(s) I should look at etc. would be greatly
appreciated.
If I stumped you, I could use an email address for
someone that actually works on the gcc/egcs team.
Andy
|
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |