Skip to content

Conversation

@2over12
Copy link
Collaborator

@2over12 2over12 commented Oct 27, 2025

No description provided.

Comment on lines 199 to 205
-> f (MT.BVType 32) -- r8
-> f (MT.BVType 32) -- r9
-> f (MT.BVType 32) -- r10
-> f (MT.BVType 32) -- r11
-> f (MT.BVType 32) -- r12
-> f (MT.BVType 32) -- r13 (sp)
-> f (MT.BVType 32) -- r14 (lr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the comments above ARMSyscall could stand to be revised a little after these changes. Currently, they are:

-- | Issue a system call
--
-- The intent is that the user provides a mapping from system call numbers to
-- handlers in macaw-aarch32-symbolic, enabling the translation to crucible to
-- replace this operation with a lookup + call to a function handle. By
-- capturing all of the necessary registers as inputs and outputs here,
-- uniform treatment is possible. See the x86 version for a more detailed
-- account of the translation strategy.
--
-- The 'WI.W' is the immediate operand embedded in the opcode
--
-- The rest of the arguments are all of the registers that participate in the
-- syscall protocol (at least on Linux). Arguments are passed in r0-r6, while
-- the syscall number is in r7.
--
-- The system call can return up to two values (in r0 and r1)

The "Arguments are passed in r0-r6, while the syscall number is in r7" bit should be updated to clarify that this specifically applies to the Linux ABI, but that other GPRs are also included such that this can also be used for different ABIs where other registers are involved.

@2over12 2over12 force-pushed the expose-more-regs-in-syscall branch from 61537b6 to 1e8442a Compare October 29, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants