Chris Lovett via llvm-dev
2017-Sep-15 19:29 UTC
[llvm-dev] LLVM mtriple for aarch64-win32-msvc ?
Is there a way to use LLC to cross-compile some code to run on Windows IOT on Raspberry Pi ? I was able to convince LLVM to spit out some bitcode for this, but when I try llc it dumps: llc.exe test.bc -o test.obj -filetype=obj -O3 -mtriple=aarch64-win32-msvc -mcpu=cortex-a53 Wrote crash dump file "C:\Users\clovett\AppData\Local\Temp\llc.exe-4990d8.dmp" 0x0000000000000000 (0x0000000000000000 0x000001AE351C38E9 0x0000000000000007 0x000001AE351C38F1) <unknown module> 0x00007FF79681B7F5 (0x000001AE3526BFE0 0x000001AE35216D40 0x000001AE3526BFE0 0x000000047738EE80) 0x00007FF79681AEF6 (0x0000000000000000 0x000000047738F0D0 0x000001AE32C27BC0 0x000001AE3526BFE0) 0x00007FF79602EEDC (0x000001AE32C27BC0 0x0000000000000000 0x0000000000000000 0x0000000000000008) 0x00007FF79603056D (0x0000000000000000 0x000001AE32C49800 0x00007FFD3B3D69D8 0x0000000000000000) 0x00007FF796D82DE9 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FFD3D712774 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s) 0x00007FFD3E420D51 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170915/f4794d1b/attachment.html>
Jonathan Roelofs via llvm-dev
2017-Sep-15 19:37 UTC
[llvm-dev] LLVM mtriple for aarch64-win32-msvc ?
On 9/15/17 1:29 PM, Chris Lovett via llvm-dev wrote:> Is there a way to use LLC to cross-compile some code to run on Windows > IOT on Raspberry Pi ? > > I was able to convince LLVM to spit out some bitcode for this, but when > I try llc it dumps:How was the bitcode generated? Also, regardless of that, llc shouldn't crash... so this is a bug. A bug report with reproducible steps would be useful. Jon> > llc.exe test.bc -o test.obj -filetype=obj -O3 > -mtriple=aarch64-win32-msvc -mcpu=cortex-a53 > Wrote crash dump file > "C:\Users\clovett\AppData\Local\Temp\llc.exe-4990d8.dmp" > 0x0000000000000000 (0x0000000000000000 0x000001AE351C38E9 > 0x0000000000000007 0x000001AE351C38F1) <unknown module> > 0x00007FF79681B7F5 (0x000001AE3526BFE0 0x000001AE35216D40 > 0x000001AE3526BFE0 0x000000047738EE80) > 0x00007FF79681AEF6 (0x0000000000000000 0x000000047738F0D0 > 0x000001AE32C27BC0 0x000001AE3526BFE0) > 0x00007FF79602EEDC (0x000001AE32C27BC0 0x0000000000000000 > 0x0000000000000000 0x0000000000000008) > 0x00007FF79603056D (0x0000000000000000 0x000001AE32C49800 > 0x00007FFD3B3D69D8 0x0000000000000000) > 0x00007FF796D82DE9 (0x0000000000000000 0x0000000000000000 > 0x0000000000000000 0x0000000000000000) > 0x00007FFD3D712774 (0x0000000000000000 0x0000000000000000 > 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 > bytes(s) > 0x00007FFD3E420D51 (0x0000000000000000 0x0000000000000000 > 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded / Siemens
Martin Storsjö via llvm-dev
2017-Sep-15 21:20 UTC
[llvm-dev] LLVM mtriple for aarch64-win32-msvc ?
On Fri, 15 Sep 2017, Chris Lovett via llvm-dev wrote:> Is there a way to use LLC to cross-compile some code to run on Windows IOT > on Raspberry Pi ? > I was able to convince LLVM to spit out some bitcode for this, but when I > try llc it dumps: > > llc.exe test.bc -o test.obj -filetype=obj -O3 -mtriple=aarch64-win32-msvc > -mcpu=cortex-a53Windows 10 IoT on Raspberry Pi (or anywhere else) is just 32 bit arm for now, so you want to try the armv7-win32-msvc target triplet instead. (There is some preliminary support for aarch64-win32 targets also; it seems to work for C code for things I've tested so far, but e.g. C++ support is incomplete. And there's no public aarch64 windows version out at all yet, it's supposedly coming late this year though. So far I've been testing it with wine.) // Martin
Chris Lovett via llvm-dev
2017-Sep-16 03:00 UTC
[llvm-dev] LLVM mtriple for aarch64-win32-msvc ?
Thanks Martin, I'm generating the code using LLVM (writing llvm::Triple myself and llvm::TargetRegistry::lookupTarget is working), and that's how my bitcode is generated then using LLC to cross-compile that. So using armv7-win32-msvc is getting me a bit closer, but what CPU, raspberry pi 3 is running a Cortext-A53, but when I specify that in -mcpu argument I get this error:> llc.exe test.bc -o test.obj -filetype=obj -O3 -mtriple=armv7-win32-msvc-mcpu=cortex-a53 -relocation-model=pic> llc.exe failed: LLVM ERROR: CPU: 'cortex-a53' does not support ARM modeexecution! On Fri, Sep 15, 2017 at 2:20 PM, Martin Storsjö <martin at martin.st> wrote:> On Fri, 15 Sep 2017, Chris Lovett via llvm-dev wrote: > > Is there a way to use LLC to cross-compile some code to run on Windows IOT >> on Raspberry Pi ? >> I was able to convince LLVM to spit out some bitcode for this, but when I >> try llc it dumps: >> >> llc.exe test.bc -o test.obj -filetype=obj -O3 -mtriple=aarch64-win32-msvc >> -mcpu=cortex-a53 >> > > Windows 10 IoT on Raspberry Pi (or anywhere else) is just 32 bit arm for > now, so you want to try the armv7-win32-msvc target triplet instead. > > (There is some preliminary support for aarch64-win32 targets also; it > seems to work for C code for things I've tested so far, but e.g. C++ > support is incomplete. And there's no public aarch64 windows version out at > all yet, it's supposedly coming late this year though. So far I've been > testing it with wine.) > > // Martin >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170915/72a55100/attachment.html>
Apparently Analagous Threads
- LLVM mtriple for aarch64-win32-msvc ?
- Compile for ARM SVE with the latest LLVM
- [RFC] Making -mcpu=generic the default for ARM armv7a and arm8a rather than -mcpu=cortex-a8 or -mcpu=cortex-a53
- [RFC] Making -mcpu=generic the default for ARM armv7a and arm8a rather than -mcpu=cortex-a8 or -mcpu=cortex-a53
- [LLVMdev] Contributing the Apple ARM64 compiler backend