Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    \$\begingroup\$ The Linux x32 ABI (ILP32 in 64-bit mode) puts all addresses, including stack, in the low 32 bits of virtual address space. You can say you're targeting that if you want to add edi, 4 instead of add rdi,4. (Although in that specific example, scasd will increment RDI by 4, assuming you haven't changed DF and it doesn't segfault). You can copy a 64-bit pointer in 2 bytes with push/pop, and maybe get away with only comparing the low 32 bits (of pointers to the same array), so there's a lot you can do while still being mostly 64-bit clean. \$\endgroup\$ Commented Oct 27, 2021 at 17:27