[llvm-dev] MSP430 code generation from LLVM IR
Nicholas Wilson via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 5 17:35:50 PDT 2017
Luís, try using the -no-integrated-as flag to execute the assembler for you.
We should probably make that the default for MSP430.
Nic
On 6 Jul 2017, at 7:50 am, Luís Marques via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hello,
While trying to find out why the LDC compiler refuses to generate object code for MSP430 targets (but generates MSP430 assembly or LLVM IR/bitcode), I came across the following apparent inconsistency.
This works:
$ clang --target=msp430 -c test.c
This doesn't work:
$ clang --target=msp430 -S -emit-llvm test.c
$ llc -filetype=obj test.ll
/opt/msp430/bin/llc: target does not support generation of this file type!
That sequence works fine for x86.
Could someone help shed some light into this discrepancy? (Maybe it will also help me figure out why LDC refuses to directly generate MSP430 object files [1]).
Thanks,
Luís
[1] $ ldc2 -mtriple=msp430 -c test.d
no support for asm output
UNREACHABLE executed at ../driver/toobj.cpp:130!
0 ldc2 0x0000000107e19c9c llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 60
1 ldc2 0x0000000107e1a1e9 PrintStackTraceSignalHandler(void*) + 25
2 ldc2 0x0000000107e16139 llvm::sys::RunSignalHandlers() + 425
3 ldc2 0x0000000107e1a642 SignalHandler(int) + 354
4 libsystem_platform.dylib 0x00007fffa0ad5b3a _sigtramp + 26
5 libsystem_platform.dylib 0x0000000000000003 _sigtramp + 1599251683
6 libsystem_c.dylib 0x00007fffa095a420 abort + 129
7 ldc2 0x0000000107d246c0 LLVMInstallFatalErrorHandler + 0
8 ldc2 0x0000000105efd2a7 codegenModule(llvm::TargetMachine&, llvm::Module&, llvm::raw_fd_ostream&, llvm::TargetMachine::CodeGenFileType) + 391
9 ldc2 0x0000000105f00ab9 (anonymous namespace)::writeObjectFile(llvm::Module*, char const*) + 377
10 ldc2 0x0000000105efcc05 writeModule(llvm::Module*, char const*) + 10517
11 ldc2 0x0000000105ee6162 ldc::CodeGenerator::writeAndFreeLLModule(char const*) + 1602
12 ldc2 0x0000000105ee6a82 ldc::CodeGenerator::finishLLModule(Module*) + 130
13 ldc2 0x0000000105ee880c ldc::CodeGenerator::emit(Module*) + 1420
14 ldc2 0x0000000105f36e4e codegenModules(Array<Module*>&) + 574
15 ldc2 0x0000000105bf2a00 mars_mainBody(Array<char const*>&, Array<char const*>&) + 5120
Abort trap: 6
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170706/01ea6d2c/attachment.html>
More information about the llvm-dev
mailing list