On 11/10/23 18:02, Keith Packard wrote:
I'm largely trusting your reputation on the fpgnulib changes. I won't
claim to know that code at all. The assembly bits were simple enough
that I could make out what you were doing relatively easily.
Thanks for that review -- m68k assembly isn't my strongest language. The
kludge to return pointers in both d1 and a1 was a bit ugly, but seemed
like a much more robust plan than attempting to use different registers
depending on the target ABI...
I get by. Things like m68k, hppa, etc have stuck harder than I would
have ever imagined. But ppc, alpha, and some of the others I've worked
on through the years, not so much.
And yes there are ABI implications on the return value. As you know
back in the day things weren't typed so well, so varying the location of
the return value based on type wasn't terribly safe. Dual output worked
around a class of problems. These days varying args/return value
location based on types is common.
The real check for these fixes was to run a fairly comprehensive C
library test suite (part of picolibc) and just iterate until I stopped
getting failures. Those tests have found so many corner cases in both
the C library, FPU emulation and compilers ...
Not surprised.
Thanks again,
Jeff