boostorg / context

307 stars 150 forks source link

XCOFF version of context assembly doesn't match ABI? #180

Closed NattyNarwhal closed 3 years ago

NattyNarwhal commented 3 years ago

I'm porting boost::context's XCOFF (you know, AIX and its ABI) assembly for PHP's own fibers (see php/php-src#7338; PHP's own), but I noticed some oddities with the assembly. (This isn't essential because of a ucontext_t fallback, but I got curious as to why.)

These seem so fundamental (and attached to the build system), so having them not work at all is a bit confusing. Especially the fact they're for the IBM and not GNU assembler, which has syntax differences.

olk commented 3 years ago

I tried to implement the XCOF variant without access to a PPC64/AIX system - so I couldn't test it and it's likely that it contains mistakes. Could you provide a fix/Pull-request, please?

NattyNarwhal commented 3 years ago

I've fixed some of the issues, but I'm still in the process of figuring out the other ones.

NattyNarwhal commented 3 years ago

Over on the PHP downstream thread, after basically forcing the AIX version to look like the ELFv1 version with IBM assembly syntax, it does appear to work fine. PR to come.

I've only tested 32-bit because the environment I'm working out of only provides 64-bit builds.

olk commented 3 years ago

ty,merged