[cfe-dev] How to add new target?
Artur Pietrek
pietreka at gmail.com
Thu Mar 25 05:33:28 PDT 2010
>
> Hi Artur,
>
Hi Daniel
> > Hi all,
> > so after "greping" the code I was able to do (more or less) everything I
> > wanted to do.
>
> As you have discovered, this stuff isn't very well documented yet. Do
> you feel like writing up a blurb we could add to our Internals Manual
> describing what you have discovered?
>
I'll try when I'll make it work correct ;)
BTW I've noticed strange behaviour. When I switched from llvm-gcc to clang,
my benchmarks stopped working. When I compile simple code:
char array[] =
"+0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
int main() {
return array[31];
}
like this:
clang -ccc-host-triple mycpu -O0 -S hello.c -o hello.s
The code is wrong, to be precise in one instruction I get
lbs $r16 = 0[$r17] instead of lbs $r16 = 31[$r17]
but the code is correct when I do it like this:
clang -ccc-host-triple mycpu -O0 hello.c -c -emit-llvm -o hello.bc
llc -march=mycpu hello.bc -o hello.s
Am I missing something? Shouldn't these two be equivalent?
Thanks in advance.
Artur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100325/8a54c166/attachment.html>
More information about the cfe-dev
mailing list