| ... | ... | @@ -225,8 +225,9 @@ pub fn fromWindowsContext(ctx: *const std.os.windows.CONTEXT) Native { |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | pub const X86 = struct { |
| 228 | | /// The first 8 registers here intentionally match the order of registers pushed |
| 229 | | /// by PUSHA, which is also the order used by the DWARF register mappings. |
| 228 | /// The first 8 registers here intentionally match the order of registers in the x86 instruction |
| 229 | /// encoding. This order is inherited by the PUSHA instruction and the DWARF register mappings, |
| 230 | /// among other things. |
| 230 | 231 | pub const Gpr = enum { |
| 231 | 232 | // zig fmt: off |
| 232 | 233 | eax, ecx, edx, ebx, |
| ... | ... | @@ -283,7 +284,9 @@ pub const X86 = struct { |
| 283 | 284 | }; |
| 284 | 285 | |
| 285 | 286 | pub const X86_64 = struct { |
| 286 | | /// MLUGG TODO: explain this order. why does DWARF have this? |
| 287 | /// The order here intentionally matches the order of the DWARF register mappings. It's unclear |
| 288 | /// where those mappings actually originated from---the ordering of the first 4 registers seems |
| 289 | /// quite unusual---but it is currently convenient for us to match DWARF. |
| 287 | 290 | pub const Gpr = enum { |
| 288 | 291 | // zig fmt: off |
| 289 | 292 | rax, rdx, rcx, rbx, |