-
Notifications
You must be signed in to change notification settings - Fork 24
Description
The ARMSyscall function assumes a certain set of registers as arguments:
| ARMSyscall :: WI.W 24 |
The function also references the x86 syscall
macaw/x86/src/Data/Macaw/X86/ArchTypes.hs
Line 808 in 54af25d
| X86Syscall :: (1 <= w) |
In my opinion these functions should not make assumptions about the system ABI. It makes it quite difficult for downstream consumers to handle ad-hoc non-linux platforms.
The comment references that this is due to the fact that translation does not hold onto current register identity (e.g. issues mentioned in #460)
I firstly am not totally convinced we couldn't just expose and populate these syscalls with more GPRs (at least on arm exposing r0-r14 seems reasonable to me). Secondarily regardless of the technical difficulties this limitations is going to cause some larger issues downstream and it also may be worth going after some solution to #460 to pass the full reg state to syscalls.
Regardless of approach I do think ideally we would lift this restriction