Filling in ARM64 ABI structs

Martin Storsjö martin at martin.st
Wed Aug 23 14:14:02 CDT 2017


Hi André,

On Wed, 23 Aug 2017, André Hentschel wrote:

> Am 22.08.2017 um 15:48 schrieb Martin Storsjö:
>> Hi,
>> 
>> I've noticed that some of the ABI specific structs for ARM64 are incomplete or missing - namely _JUMP_BUFFER in include/msvcrt/setjmp.h (not yet available) and _CONTEXT (not missing but only has got made-up content so far) and associated CONTEXT_* defines, and structs like RUNTIME_FUNCTION and UNWIND_HISTORY_TABLE in include/winnt.h.
>> 
>> As far as I know, these structs should be available in the win10 sdk. (MSDN doesn't have them but just says to refer to winnt.h for the CONTEXT struct at least). In order not to accidentally make myself uneligible for contributing code on these matters, I've tried to not look at the sdk.
>> 
>> Can someone help out with completeing these data structures according to whatever clean-room guidelines are required? When looking at existing code with git blame, they mostly appear as such without any further explanation on how they were derived, so I'm taking the more cautious route here.
>> 
>> // Martin
>> 
>> 
>
> Hi,
>
> IANAL, but you should be fine as long as you only study the headers and 
> don't copy&paste...

Thanks - if someone else can confirm this I can proceed in this way 
myself.

> Sadly I have no idea anymore how I implemented JUMP_BUFFER for ARM, but 
> it's a good thing to have an application which needs it, as it seems we 
> only have tests for amd64

Since I've got a pretty much working compiler for this, I can create 
whatever calling code I want to test it. I can't know for sure that it's 
correct with what the so far non-public MSVC/arm64 would do, but I doubt 
it'd differ too much.

> What is also strongly needed is that distributions stop using x18, have 
> you done something in this regard?

Not really. In all the code I've tested so far, I haven't struck any 
concrete issues with only wine but not the rest of the distro built with 
-ffixed-x18. But then again, the apps I've built myself don't use the TEB 
at all, so I won't notice either - I've mostly tested uuidgen.exe and 
midl.exe from the win10 sdk, for generic compatibility and compatibility 
with the va_args.

// Martin


More information about the wine-devel mailing list