[llvm-dev] status of msp430?

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 17 00:42:23 PDT 2018

Hi Andrew,

On Sun, 17 Jun 2018 at 02:47, Andrew Kelley via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I have a user asking about msp430 support for Zig. When they try to target msp430, this error is triggered:
>         if (target_machine->addPassesToEmitFile(MPM, dest, ft)) {
>             *error_message = strdup("TargetMachine can't emit a file of this type");
>             return true;
>         }

It looks like there's no support for emitting object files in MSP430
(and so no JIT).

> $ clang -c add.c -target msp430-unknown
> /run/user/1000/add-91f569.s: Assembler messages:
> /run/user/1000/add-91f569.s:7: Error: no such instruction: `push.w r4'

This is for the same reason as above. Because Clang can't emit an
object file it's emitting textual assembly and calling the host's
assembler on it. Obviously that doesn't go well when the host's
assembler is expecting x86 input.

> Is msp430 supported?

I think it's a bit of a grey area. It's had about 2 patches in the
last year so it's not exactly active, and I don't know of anyone doing
runtime tests to make sure regressions don't creep in. But it's a
fairly simple backend so chances are it'll keep working anyway.



More information about the llvm-dev mailing list