#desmetc — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #desmetc, aggregated by home.social.
-
btw the #ELKS maintainer has also been hacking on #DesmetC and has his own fork (though still closely related to the main DOS repo) that is able to compile an increasingly large amount of stuff natively from within ELKS :blobcheerbounce: It's great seeing ongoing interest in on-target 8086 development, as opposed to just cross builds.
-
On the plus side I seem to have corrected lots of #DesmetC mul/div/mod bugs in one fell swoop by rewriting the relevant part of its codegen, lmao. So many type hacks, gone.
On the minus side, I think now I might be finding some bugs in #OpenWatcom C, which was supposed to be my infallible test oracle, dammit ;D
-
Latest #DesmetC "explorations with machete and torch": the compiler source has numbered constants for each supported C datatype. Normally you'd use enum for this sort of thing, but this codebase used
#defines. The constants were numbered in a strange order, and I wanted to re-sort them in the order of the "usual arithmetic conversions", to simplify some logic. This broke code-gen, emitting illegal instructions. Several hours later, I found that CCHAR=1 and CINT=2 were directly used in hex math determining which x86 opcode to emit. When I renumbered those constants, it caused absurd instructions to be generated. After correcting that problem, we are now back to self-hosting o.k.
I'm hoping this will make it possible to retire a bunch of one-off type promotion logic scattered around the compiler, in favor of a few central functions closely mapping to the C89 standard.