[llvm-dev] MSP430 code generation from LLVM IR
Luís Marques via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 5 17:51:22 PDT 2017
On Thu, Jul 6, 2017 at 1:35 AM, Nicholas Wilson <
iamthewilsonator at hotmail.com> wrote:
> Luís, try using the -no-integrated-as flag to execute the assembler for
> you.
> We should probably make that the default for MSP430.
>
Cool. When I did that on macOS, LDC generated a lot of complaints, possibly
because it is assuming mach-o files. I tried changing from -mtriple=msp430
to -mtriple=msp430-unknown-elf, to no avail. E.g.:
$ ldc2 -mtriple=msp430-unknown-elf -c -no-integrated-as qosd.d
ldc-ad1c8f0.s:3:11: error: mach-o section specifier requires a segment
whose length is between 1 and 16 characters
.section
.text._D4qosd3fooFZi,"axG", at progbits,_D4qosd3fooFZi,comdat
^
ldc-ad1c8f0.s:6:2: error: unknown directive
.type _D4qosd3fooFZi, at function
^
ldc-ad1c8f0.s:8:2: error: invalid instruction mnemonic 'mov.w'
mov.w #42, r14
^~~~~
(...)
I didn't try it in a Linux host. I imagine a lot of the errors will go away
there (because it assumes ELF), but possibly not the ones about 'mov.w'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170706/167445bc/attachment.html>
More information about the llvm-dev
mailing list