akkartik / mu

Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
http://akkartik.name/akkartik-convivial-20200607.pdf
Other
1.35k stars 47 forks source link

Start computing the Carry Flag (CF) everywhere #31

Closed akkartik closed 5 years ago

akkartik commented 5 years ago

Fixes #30.

akkartik commented 5 years ago

To answer one of the open questions, imul always sets CF and OF to identical values: https://c9x.me/x86/html/file_module_x86_id_138.html

akkartik commented 5 years ago

Oh never mind, imul is defined as signed multiplication, so of course the flags will be identical.

Unsigned multiplication also leaves CF and OF at identical values: https://c9x.me/x86/html/file_module_x86_id_210.html