Originally Posted by nogginthenog
Have you seen this:
I compiled it and it does work (Debian Linux). But any C function call fails...
typedef unsigned int uint32_t;
typedef char int8_t;
uint32_t foo(uint32_t x, int8_t y)
return (x | (1 << 17)) + y;
clang -emit-llvm test.c -c -O2 -o test.ll
./llvm-m68k/build/bin/llc -march=m68k test.ll
; GLOBAL foo
foo PROC ; @foo
move.l #131072, d1
or.l (a6), d1
move.b 4(a6), d0
add.l d1, d0
Is there any specific configuration setup you used to compile llvm here? I've built with m68k target, but I'm getting a crash even with this simple example. I'm not sure if its triple related, as I just left the default triple as it was.
I should get more time to look into this tonight I hope, so any pointers would be appreciated, otherwise I'll just poke things until it works...