IRC channel logs
2025-05-12.log
back to list of logs
<stikonas>mihi: indeed. And posix-runner does already disable interrupts, I had to do that in order to emulate "syscalls" <stikonas>and anything pre posix-runner wouldn't care about paging <nikolar>I have a silly question, does anyone know of an easily retargetabble c compiler <nikolar>I'd like to mess with implementing a CPU on an FPGA and it would be handy to have a c compiler <stikonas>in the machine code -> GCC chain that's the first (subset of) C compiler written in (even smaller subset of) C <stikonas>recently it gained quite a few features mostly thanks to gtker <nikolar>Oh it just has bit ifs for arch selection, simple enough <stikonas>though with current optimizations it needs at least 8 registers <stikonas>the downside is that it emits M1 assembly and not GAS compatible... <nikolar>Interesting, how does it handle different classes of registers <nikolar>(like n68k's address and data registers) <nikolar>And I imagine I can make it output whatever assembly I want, I don't necessarily target bootstrappability <stikonas>at least on other arches, registers don't really differ, we just picked some for specific roles <stikonas>not necesserily matching ABI's used by GCC/Linux, etc... <stikonas>though for most arches at least base and stack registers are conventional <nikolar>On m68k, some instructions only accept either data or address registers <nikolar>And some addressing modes can only use address registers <stikonas>well, you could see if in those new emit functions (in cc_emit.c) you could somehow match registers / instructions to the ones that n68k needs <stikonas>presumably you can move data between registers? <nikolar>And a few addressing modes work with both types, etc