IRC channel logs
2024-09-16.log
back to list of logs
<Googulator>oriansj: don't forget 8/16-bit type support; it's probably the biggest missing feature in M2 <matrix_bridge><cosinusoidally> To work around lack of comment files I feed hex2 files through M0 a second time I mean <matrix_bridge><Andrius Štikonas> Googulator: we do have partial 8/16 bit support <matrix_bridge><Andrius Štikonas> But at least you can store shorter ints in structs <Googulator>stikonas: the issue is with 8/16-bit arrays, especially writing them (we always write 32 bits) <oriansj>Googulator: I know 8bit arrays (char* ) work in M2-Planet for both reading, comparison and writing; and pointers are always 32bits <matrix_bridge><cosinusoidally> Pointers are always 32 bit in M2-Planet? Even on the 64 bit backends? In C ints are typically 32 bit on both 32 bit and 64 bit, but iirc M2 uses 32 bit ints on 32 bit and 64 bit on 64 bit? <matrix_bridge><cosinusoidally> I thought it was the same with pointers on M2? <stikonas>I think oriansj was talking about 32-bits <oriansj>cosinusoidally: pointers on M2-Planet should be thought of as 32bit because any M2-Planet program greater than 2GB will be broken as the jumps and other behavior will be wrong. <stikonas>but some stuff is probably outside 32-bit? itsn't it <oriansj>and M2-Planet will allocate 8bytes for storing those values <oriansj>but those are set by the kernel and not M2-Planet <stikonas>I think in the end on x86_64 we only use jmp32 instruction <matrix_bridge><cosinusoidally> but you can handle 64 bit addresses for data? <oriansj>in fact on ARMv7 is limited to 24MB for jmp limits <oriansj>efficient common case vs big binary support. So yeah <oriansj>basically M2-Planet is not expected to be used past GNU Mes or TCC and creating a 24MB binary via M2-Planet+mescc-tools is just a bad idea <oriansj>but 20MB is plenty of space for a pretty huge C compiler to be written <stikonas>also integer literals in M2-Planet are limited to 31-bit <oriansj>right now the biggest thing M2-Planet makes is M2-Mesoplanet (1.3MB) <oriansj>and for x86 only makes 14MB of binaries total <matrix_bridge>-rwxr-xr-x 1 root root 22M Apr 15 2018 usr/lib/gcc/i686-linux-gnu/7/cc1 <oriansj>stikonas: good question, I am not sure <oriansj>perhaps a difference in M2libc (has more architectures and dumb syscalls) and meslibc (has more functions and clever syscalls)