FEX-Emu / FEX

A fast usermode x86 and x86-64 emulator for Arm64 Linux
https://fex-emu.com
MIT License
2.34k stars 123 forks source link

Support 64-bit ioctl emulation #1241

Open Sonicadvance1 opened 3 years ago

Sonicadvance1 commented 3 years ago

Thunks will largely take care of this but for the fallback case we need to support emulation to work around struct packing quirks. This mainly comes from 64bit values having a 4 byte alignment on x86 and x86-64 while on aarch64 they have natural alignment. I have already encountered this issue on V3D/VC4 ioctls.

paisuhas commented 2 years ago

A question about your comment on alignment. Aren't 64-bit values naturally aligned on x86-64? When do they have 4-byte alignment?