Hello,
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;
}
I tried using clang alone: clang -c add.c -target msp430-unknown
int add(int a, int b) {
return a + b;
}
$ 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' /run/user/1000/add-91f569.s:8: Error: no such instruction:
mov.w r1,r4’
/run/user/1000/add-91f569.s:9: Error: no such instruction: sub.w ' /run/user/1000/add-91f569.s:10: Error: no such instruction:
mov.w r13,r14’
/run/user/1000/add-91f569.s:11: Error: no such instruction: mov.w r12,r15' /run/user/1000/add-91f569.s:12: Error: no such instruction:
mov.w r12,-2(r4)’
/run/user/1000/add-91f569.s:13: Error: no such instruction: mov.w r13,-4(r4)' /run/user/1000/add-91f569.s:14: Error: no such instruction:
mov.w -2(r4),r12’
/run/user/1000/add-91f569.s:15: Error: no such instruction: mov.w -4(r4),r13' /run/user/1000/add-91f569.s:16: Error: no such instruction:
add.w r13,r12’
/run/user/1000/add-91f569.s:17: Error: no such instruction: mov.w r14,-6(r4)' /run/user/1000/add-91f569.s:18: Error: no such instruction:
mov.w r15,-8(r4)’
/run/user/1000/add-91f569.s:19: Error: no such instruction: add.w ' /run/user/1000/add-91f569.s:20: Error: no such instruction:
pop.w r4’
clang-6.0: error: assembler command failed with exit code 1 (use -v to see invocation)
It looks like msp430 is in the non-experimental target list:
List of all targets to be built by default:
set(LLVM_ALL_TARGETS
AArch64
AMDGPU
ARM
BPF
Hexagon
Lanai
Mips
MSP430
NVPTX
PowerPC
Sparc
SystemZ
X86
XCore
)
Is msp430 supported?