Hello, Last year I tried --- and failed --- to generate float-heavy ARM code via the JIT on an armhf platform. No matter what I did, it would always generate armel code instead. This was on LLVM 3.2, which was all that was available then. Now I'm running into a requirement to do this again: while it's much less crashy than it was, I still can't seem to persuade the JIT to generate hard-float code. This is with LLVM 3.3, 3.4 and 3.5. I'm using MCJIT (although I've tried without, as well), and I've tried setting FloatABI to HardFloat. Does anyone know if this is actually working yet? If so, are there any examples of how to do this successfully? -- ┌─── 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/4aca874c/attachment.sig>
Hi David, On 23 July 2014 12:47, David Given <dg at cowlark.com> wrote:> Now I'm running into a requirement to do this again: while it's much > less crashy than it was, I still can't seem to persuade the JIT to > generate hard-float code. This is with LLVM 3.3, 3.4 and 3.5. I'm using > MCJIT (although I've tried without, as well),Using MCJIT is definitely the right thing to do.> and I've tried setting FloatABI to HardFloat.My best guess is that you're only specifying an architecture (i.e. the equivalent of "-march=arm" for llc). That means LLVM will default to the older APCS calling convention, and won't ever use hard-float (there just isn't a hard-float APCS ABI). You should probably be specifying a triple directly, and making it an AAPCS-VFP one for good measure: "armv7-linux-gnueabihf" for example, or "thumbv7-none-eabihf". You shouldn't even need to set FloatABI for those two. Cheers. Tim.
On 7/23/14, 1:20 PM, Tim Northover wrote: [...]> You should probably be specifying a triple directly, and making it an > AAPCS-VFP one for good measure: "armv7-linux-gnueabihf" for example, > or "thumbv7-none-eabihf". You shouldn't even need to set FloatABI for > those two.How do I do this? (I can't find any examples, and the API is decidedly unclear...) -- ┌─── 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/797a8e41/attachment.sig>