[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pcc] First cut of m68k support.



Thorsten Glaser skrev 2014-03-23 22:59:
Anders Magnusson dixit:
It can generate enough code to put out "Hello world", which means that the
remaining to add it almost only instructions :-)
Not for me:

root@ara4:~ # cat hw.c
#include <sys/types.h>
#include <unistd.h>

static const char msg[] = "Hello, World!\n";

int
main(void)
{
         write(1, msg, 14);
         return (0);
}
root@ara4:~ # /opt/pcc/bin/pcc -c hw.c
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 81: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 83: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 83: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 83: warning: shift larger than type
/usr/include/m68k-linux-gnu//bits/byteswap.h, line 83: warning: shift larger than type
hw.c, line 9: compiler error: Cannot generate code, node 0x80062c54 op FUNARG
/opt/pcc/libexec/ccom terminated with status 1


Please share your testcase, so I can test better ☻

sun3$ uname -a
NetBSD sun3 6.1 NetBSD 6.1 (GENERIC)
sun3% echo 'main(){printf("Hello World\n"); }' > x.c
sun3% pcc -S x.c
sun3% gcc x.s
sun3% ./a.out
Hello World



Reply to: