Closed chrisridd closed 2 years ago
This doesn't add full fix31 support everywhere, but it should be a good start for adding the remaining support e.g. vqt_advance32()
, vqt_f_extent()
, v_ftext()
etc.
Thank you for your pull request.
It appears your changes aren't liked much by pacf
, however, causing the build process for ColdFire to fail.
Can you check, please?
I'm puzzled by that. It looks like pacf
is being told "gas=1" so is using macros.gnu
. But even though gas
is OK with them, pacf
is somehow not. Strange.
I'll need to get pacf
installed in a Linux x86 VM to investigate further.
What platform are you on? There is a pacf.exe for Windows (nothing for Mac, unfortunately) as well.
I'm on an M1 Mac. But I can get a Linux VM going on my work x86 Mac and install pacf there.
After some investigation, it looks like pacf doesn't convert register names passed as parameters to a macro. You'd need to write something like this:
ifne mcoldfire
short_to_fix31 %d0,(%a2)
else
short_to_fix31 d0,(a2)
endc
which is pretty gross and IMO loses most of the benefits of using the macro. pacf
also adds code to preserve registers around the macro, which might need disabling somehow.
I'll play around some more and maybe contact MicroAPL but I think I might have to revert from using macros with register parameters 😞
OK, so while trying to figure out a test case for microapl support I figured out what was wrong. The change was in the macro definitions. From:
.if \src == \dst
to:
.ifc \src,\dst
(And a similar one to .ifnc
)
Great you found the culprit. Thanks again!
font->size (short) has been renamed and is now replaced with font->extra.size (fix31). Many C interfaces are now changed to take fix31 sizes, and to convert back to short when necessary.
New assembly macros are added for fix31<->short conversions, and to slightly improve readability. The GNU macros are tested. The Lattice and PortAsm macros are hopefully correct.
vst_arbpt32() is now supported correctly. Papyrus uses this a lot.