[llvm-commits] EABI triples patch (1/2)
renato.golin at arm.com
Tue Jan 18 11:35:41 CST 2011
The attached patch adds support for EABI triples in LLVM (from today's
r123755) regarding bug #8957
Clang was not parsing target triples involving EABI and was generating
wrong IR (wrong PCS) and passing the wrong information down llc via
the target-triple printed in IR. I've fixed this by adding the parsing
of EABI into LLVM's Triple class and using it to choose the correct
PCS in Clang's Tools.
There's still some edges to cover, such as the decisions of which PCS
to use based on Darwin's defaults (v6/v7). We should add support for
architecture definitions (TargetData?) to Clang, to be able to
correctly pass the options to llc AND re-generate the correct target
triple in the final IR.
This patch (1/2):
This is the LLVM part, that adds EABI, GNUEABI and GNU Environments to
the EnvironmentType enum, as well as support for the "none" in the
triple. Parsing of the "arm-none-eabi" triple is done by guessing
Environment from OS when OS is "none". Not the best way to do it, but
the triple support in LLVM is not that deterministic.
I also fixed a problem created by adding the environment parsing with
triple "x86_64-gnu-linux" from one of the Clang tests, since "gnu" now
is an environment. Test cases were added to test the new functionality
and the change didn't break any other unit test.
The second part of the patch (clang side) will be sent in a different email.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5251 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110118/25c708eb/attachment-0001.bin
More information about the llvm-commits