On 7/23/14, 3:30 PM, Tim Northover wrote:
[...]> It looks like it's a case of calling Module::setTargetTriple. As with
> most JIT setup questions, though, often the best way to find out is to
> get something working in lli and then look at what it does
> (tools/lli/lli.cpp).
Well, it's *almost* working --- hardfloat code is now being generated,
and it even seems to be right most of the time!
Unfortunately it looks like it's getting calling conventions wrong. This
IR code:
define void @Entrypoint(float %in, float* %out) {
store float %in, float* %out
}
...gets compiled to this:
STRi12 %R0<kill>, %R1<kill>, 0, pred:14, pred:%noreg;
mem:ST4[%out]
BX_RET pred:14, pred:%noreg
(typed by hand, so may contain typos).
So it looks like it's assuming that float parameters are being passed in
integer registers, which isn't the case on armhf.
Could it be under the impression that I'm running on an armel system? In
which case the above code is correct. This would explain why the default
setting appears to generate armel code. Is this controllable?
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "Feminism encourages women to leave their husbands, kill their
│ children, practice withcraft, destroy capitalism and become lesbians."
│ --- Rev. Pat Robertson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 876 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140723/f824b31c/attachment.sig>