| ... | ... | @@ -240,9 +240,11 @@ pub fn fromWindowsContext(ctx: *const std.os.windows.CONTEXT) Native { |
| 240 | 240 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 241 | 241 | const Aarch64 = extern struct { |
| 242 | 242 | /// The numbered general-purpose registers X0 - X30. |
| 243 | | x: [31]u64, |
| 244 | | sp: u64, |
| 245 | | pc: u64, |
| 243 | x: [31]Gpr, |
| 244 | sp: Gpr, |
| 245 | pc: Gpr, |
| 246 | |
| 247 | pub const Gpr = u64; |
| 246 | 248 | |
| 247 | 249 | pub inline fn current() Aarch64 { |
| 248 | 250 | var ctx: Aarch64 = undefined; |
| ... | ... | @@ -273,10 +275,10 @@ const Aarch64 = extern struct { |
| 273 | 275 | return ctx; |
| 274 | 276 | } |
| 275 | 277 | |
| 276 | | pub fn getFp(ctx: *const Aarch64) u64 { |
| 278 | pub fn getFp(ctx: *const Aarch64) usize { |
| 277 | 279 | return ctx.x[29]; |
| 278 | 280 | } |
| 279 | | pub fn getPc(ctx: *const Aarch64) u64 { |
| 281 | pub fn getPc(ctx: *const Aarch64) usize { |
| 280 | 282 | return ctx.pc; |
| 281 | 283 | } |
| 282 | 284 | |
| ... | ... | @@ -308,8 +310,10 @@ const Aarch64 = extern struct { |
| 308 | 310 | |
| 309 | 311 | const Alpha = extern struct { |
| 310 | 312 | /// The numbered general-purpose registers R0 - R31. |
| 311 | | r: [32]u64, |
| 312 | | pc: u64, |
| 313 | r: [32]Gpr, |
| 314 | pc: Gpr, |
| 315 | |
| 316 | pub const Gpr = u64; |
| 313 | 317 | |
| 314 | 318 | pub inline fn current() Alpha { |
| 315 | 319 | var ctx: Alpha = undefined; |
| ... | ... | @@ -355,10 +359,10 @@ const Alpha = extern struct { |
| 355 | 359 | return ctx; |
| 356 | 360 | } |
| 357 | 361 | |
| 358 | | pub fn getFp(ctx: *const Alpha) u64 { |
| 362 | pub fn getFp(ctx: *const Alpha) usize { |
| 359 | 363 | return ctx.r[15]; |
| 360 | 364 | } |
| 361 | | pub fn getPc(ctx: *const Alpha) u64 { |
| 365 | pub fn getPc(ctx: *const Alpha) usize { |
| 362 | 366 | return ctx.pc; |
| 363 | 367 | } |
| 364 | 368 | |
| ... | ... | @@ -378,8 +382,10 @@ const Alpha = extern struct { |
| 378 | 382 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 379 | 383 | const Arc = extern struct { |
| 380 | 384 | /// The numbered general-purpose registers r0 - r31. |
| 381 | | r: [32]u32, |
| 382 | | pcl: u32, |
| 385 | r: [32]Gpr, |
| 386 | pcl: Gpr, |
| 387 | |
| 388 | pub const Gpr = u32; |
| 383 | 389 | |
| 384 | 390 | pub inline fn current() Arc { |
| 385 | 391 | var ctx: Arc = undefined; |
| ... | ... | @@ -423,10 +429,10 @@ const Arc = extern struct { |
| 423 | 429 | return ctx; |
| 424 | 430 | } |
| 425 | 431 | |
| 426 | | pub fn getFp(ctx: *const Arc) u32 { |
| 432 | pub fn getFp(ctx: *const Arc) usize { |
| 427 | 433 | return ctx.r[27]; |
| 428 | 434 | } |
| 429 | | pub fn getPc(ctx: *const Arc) u32 { |
| 435 | pub fn getPc(ctx: *const Arc) usize { |
| 430 | 436 | return ctx.pcl; |
| 431 | 437 | } |
| 432 | 438 | |
| ... | ... | @@ -446,7 +452,9 @@ const Arc = extern struct { |
| 446 | 452 | |
| 447 | 453 | const Arm = struct { |
| 448 | 454 | /// The numbered general-purpose registers R0 - R15. |
| 449 | | r: [16]u32, |
| 455 | r: [16]Gpr, |
| 456 | |
| 457 | pub const Gpr = u32; |
| 450 | 458 | |
| 451 | 459 | pub inline fn current() Arm { |
| 452 | 460 | var ctx: Arm = undefined; |
| ... | ... | @@ -462,10 +470,10 @@ const Arm = struct { |
| 462 | 470 | return ctx; |
| 463 | 471 | } |
| 464 | 472 | |
| 465 | | pub fn getFp(ctx: *const Arm) u32 { |
| 473 | pub fn getFp(ctx: *const Arm) usize { |
| 466 | 474 | return ctx.r[11]; |
| 467 | 475 | } |
| 468 | | pub fn getPc(ctx: *const Arm) u32 { |
| 476 | pub fn getPc(ctx: *const Arm) usize { |
| 469 | 477 | return ctx.r[15]; |
| 470 | 478 | } |
| 471 | 479 | |
| ... | ... | @@ -512,8 +520,10 @@ const Arm = struct { |
| 512 | 520 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 513 | 521 | const Csky = extern struct { |
| 514 | 522 | /// The numbered general-purpose registers r0 - r31. |
| 515 | | r: [32]u32, |
| 516 | | pc: u32, |
| 523 | r: [32]Gpr, |
| 524 | pc: Gpr, |
| 525 | |
| 526 | pub const Gpr = u32; |
| 517 | 527 | |
| 518 | 528 | pub inline fn current() Csky { |
| 519 | 529 | var ctx: Csky = undefined; |
| ... | ... | @@ -528,10 +538,10 @@ const Csky = extern struct { |
| 528 | 538 | return ctx; |
| 529 | 539 | } |
| 530 | 540 | |
| 531 | | pub fn getFp(ctx: *const Csky) u32 { |
| 541 | pub fn getFp(ctx: *const Csky) usize { |
| 532 | 542 | return ctx.r[14]; |
| 533 | 543 | } |
| 534 | | pub fn getPc(ctx: *const Csky) u32 { |
| 544 | pub fn getPc(ctx: *const Csky) usize { |
| 535 | 545 | return ctx.pc; |
| 536 | 546 | } |
| 537 | 547 | |
| ... | ... | @@ -550,8 +560,10 @@ const Csky = extern struct { |
| 550 | 560 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 551 | 561 | const Hexagon = extern struct { |
| 552 | 562 | /// The numbered general-purpose registers r0 - r31. |
| 553 | | r: [32]u32, |
| 554 | | pc: u32, |
| 563 | r: [32]Gpr, |
| 564 | pc: Gpr, |
| 565 | |
| 566 | pub const Gpr = u32; |
| 555 | 567 | |
| 556 | 568 | pub inline fn current() Hexagon { |
| 557 | 569 | var ctx: Hexagon = undefined; |
| ... | ... | @@ -596,10 +608,10 @@ const Hexagon = extern struct { |
| 596 | 608 | return ctx; |
| 597 | 609 | } |
| 598 | 610 | |
| 599 | | pub fn getFp(ctx: *const Hexagon) u32 { |
| 611 | pub fn getFp(ctx: *const Hexagon) usize { |
| 600 | 612 | return ctx.r[30]; |
| 601 | 613 | } |
| 602 | | pub fn getPc(ctx: *const Hexagon) u32 { |
| 614 | pub fn getPc(ctx: *const Hexagon) usize { |
| 603 | 615 | return ctx.pc; |
| 604 | 616 | } |
| 605 | 617 | |
| ... | ... | @@ -623,9 +635,11 @@ const Hexagon = extern struct { |
| 623 | 635 | |
| 624 | 636 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 625 | 637 | const Kvx = extern struct { |
| 626 | | r: [64]u64, |
| 627 | | ra: u64, |
| 628 | | pc: u64, |
| 638 | r: [64]Gpr, |
| 639 | ra: Gpr, |
| 640 | pc: Gpr, |
| 641 | |
| 642 | pub const Gpr = u64; |
| 629 | 643 | |
| 630 | 644 | pub inline fn current() Kvx { |
| 631 | 645 | var ctx: Kvx = undefined; |
| ... | ... | @@ -671,10 +685,10 @@ const Kvx = extern struct { |
| 671 | 685 | return ctx; |
| 672 | 686 | } |
| 673 | 687 | |
| 674 | | pub fn getFp(ctx: *const Kvx) u64 { |
| 688 | pub fn getFp(ctx: *const Kvx) usize { |
| 675 | 689 | return ctx.r[14]; |
| 676 | 690 | } |
| 677 | | pub fn getPc(ctx: *const Kvx) u64 { |
| 691 | pub fn getPc(ctx: *const Kvx) usize { |
| 678 | 692 | return ctx.pc; |
| 679 | 693 | } |
| 680 | 694 | |
| ... | ... | @@ -695,7 +709,9 @@ const Kvx = extern struct { |
| 695 | 709 | |
| 696 | 710 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 697 | 711 | const Lanai = extern struct { |
| 698 | | r: [32]u32, |
| 712 | r: [32]Gpr, |
| 713 | |
| 714 | pub const Gpr = u32; |
| 699 | 715 | |
| 700 | 716 | pub inline fn current() Lanai { |
| 701 | 717 | var ctx: Lanai = undefined; |
| ... | ... | @@ -738,10 +754,10 @@ const Lanai = extern struct { |
| 738 | 754 | return ctx; |
| 739 | 755 | } |
| 740 | 756 | |
| 741 | | pub fn getFp(ctx: *const Lanai) u32 { |
| 757 | pub fn getFp(ctx: *const Lanai) usize { |
| 742 | 758 | return ctx.r[5]; |
| 743 | 759 | } |
| 744 | | pub fn getPc(ctx: *const Lanai) u32 { |
| 760 | pub fn getPc(ctx: *const Lanai) usize { |
| 745 | 761 | return ctx.r[2]; |
| 746 | 762 | } |
| 747 | 763 | |
| ... | ... | @@ -842,10 +858,10 @@ const LoongArch = extern struct { |
| 842 | 858 | return ctx; |
| 843 | 859 | } |
| 844 | 860 | |
| 845 | | pub fn getFp(ctx: *const LoongArch) Gpr { |
| 861 | pub fn getFp(ctx: *const LoongArch) usize { |
| 846 | 862 | return ctx.r[22]; |
| 847 | 863 | } |
| 848 | | pub fn getPc(ctx: *const LoongArch) Gpr { |
| 864 | pub fn getPc(ctx: *const LoongArch) usize { |
| 849 | 865 | return ctx.pc; |
| 850 | 866 | } |
| 851 | 867 | |
| ... | ... | @@ -864,10 +880,12 @@ const LoongArch = extern struct { |
| 864 | 880 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 865 | 881 | const M68k = extern struct { |
| 866 | 882 | /// The numbered data registers d0 - d7. |
| 867 | | d: [8]u32, |
| 883 | d: [8]Gpr, |
| 868 | 884 | /// The numbered address registers a0 - a7. |
| 869 | | a: [8]u32, |
| 870 | | pc: u32, |
| 885 | a: [8]Gpr, |
| 886 | pc: Gpr, |
| 887 | |
| 888 | pub const Gpr = u32; |
| 871 | 889 | |
| 872 | 890 | pub inline fn current() M68k { |
| 873 | 891 | var ctx: M68k = undefined; |
| ... | ... | @@ -881,10 +899,10 @@ const M68k = extern struct { |
| 881 | 899 | return ctx; |
| 882 | 900 | } |
| 883 | 901 | |
| 884 | | pub fn getFp(ctx: *const M68k) u32 { |
| 902 | pub fn getFp(ctx: *const M68k) usize { |
| 885 | 903 | return ctx.a[6]; |
| 886 | 904 | } |
| 887 | | pub fn getPc(ctx: *const M68k) u32 { |
| 905 | pub fn getPc(ctx: *const M68k) usize { |
| 888 | 906 | return ctx.pc; |
| 889 | 907 | } |
| 890 | 908 | |
| ... | ... | @@ -905,8 +923,10 @@ const M68k = extern struct { |
| 905 | 923 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 906 | 924 | const M88k = extern struct { |
| 907 | 925 | /// The numbered general-purpose registers r0 - r31. |
| 908 | | r: [32]u32, |
| 909 | | xip: u32, |
| 926 | r: [32]Gpr, |
| 927 | xip: Gpr, |
| 928 | |
| 929 | pub const Gpr = u32; |
| 910 | 930 | |
| 911 | 931 | pub inline fn current() M88k { |
| 912 | 932 | var ctx: M88k = undefined; |
| ... | ... | @@ -952,10 +972,10 @@ const M88k = extern struct { |
| 952 | 972 | return ctx; |
| 953 | 973 | } |
| 954 | 974 | |
| 955 | | pub fn getFp(ctx: *const M88k) u32 { |
| 975 | pub fn getFp(ctx: *const M88k) usize { |
| 956 | 976 | return ctx.r[30]; |
| 957 | 977 | } |
| 958 | | pub fn getPc(ctx: *const M88k) u32 { |
| 978 | pub fn getPc(ctx: *const M88k) usize { |
| 959 | 979 | return ctx.xip; |
| 960 | 980 | } |
| 961 | 981 | |
| ... | ... | @@ -1103,8 +1123,10 @@ const Mips = extern struct { |
| 1103 | 1123 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 1104 | 1124 | const Or1k = extern struct { |
| 1105 | 1125 | /// The numbered general-purpose registers r0 - r31. |
| 1106 | | r: [32]u32, |
| 1107 | | pc: u32, |
| 1126 | r: [32]Gpr, |
| 1127 | pc: Gpr, |
| 1128 | |
| 1129 | pub const Gpr = u32; |
| 1108 | 1130 | |
| 1109 | 1131 | pub inline fn current() Or1k { |
| 1110 | 1132 | var ctx: Or1k = undefined; |
| ... | ... | @@ -1150,10 +1172,10 @@ const Or1k = extern struct { |
| 1150 | 1172 | return ctx; |
| 1151 | 1173 | } |
| 1152 | 1174 | |
| 1153 | | pub fn getFp(ctx: *const Or1k) u32 { |
| 1175 | pub fn getFp(ctx: *const Or1k) usize { |
| 1154 | 1176 | return ctx.r[2]; |
| 1155 | 1177 | } |
| 1156 | | pub fn getPc(ctx: *const Or1k) u32 { |
| 1178 | pub fn getPc(ctx: *const Or1k) usize { |
| 1157 | 1179 | return ctx.pc; |
| 1158 | 1180 | } |
| 1159 | 1181 | |
| ... | ... | @@ -1262,10 +1284,10 @@ const Powerpc = extern struct { |
| 1262 | 1284 | return ctx; |
| 1263 | 1285 | } |
| 1264 | 1286 | |
| 1265 | | pub fn getFp(ctx: *const Powerpc) Gpr { |
| 1287 | pub fn getFp(ctx: *const Powerpc) usize { |
| 1266 | 1288 | return ctx.r[1]; |
| 1267 | 1289 | } |
| 1268 | | pub fn getPc(ctx: *const Powerpc) Gpr { |
| 1290 | pub fn getPc(ctx: *const Powerpc) usize { |
| 1269 | 1291 | return ctx.pc; |
| 1270 | 1292 | } |
| 1271 | 1293 | |
| ... | ... | @@ -1415,10 +1437,10 @@ const Riscv = extern struct { |
| 1415 | 1437 | return ctx; |
| 1416 | 1438 | } |
| 1417 | 1439 | |
| 1418 | | pub fn getFp(ctx: *const Riscv) Gpr { |
| 1440 | pub fn getFp(ctx: *const Riscv) usize { |
| 1419 | 1441 | return ctx.x[8]; |
| 1420 | 1442 | } |
| 1421 | | pub fn getPc(ctx: *const Riscv) Gpr { |
| 1443 | pub fn getPc(ctx: *const Riscv) usize { |
| 1422 | 1444 | return ctx.pc; |
| 1423 | 1445 | } |
| 1424 | 1446 | |
| ... | ... | @@ -1441,13 +1463,15 @@ const Riscv = extern struct { |
| 1441 | 1463 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 1442 | 1464 | const S390x = extern struct { |
| 1443 | 1465 | /// The numbered general-purpose registers r0 - r15. |
| 1444 | | r: [16]u64, |
| 1466 | r: [16]Gpr, |
| 1445 | 1467 | /// The program counter. |
| 1446 | 1468 | psw: extern struct { |
| 1447 | | mask: u64, |
| 1448 | | addr: u64, |
| 1469 | mask: Gpr, |
| 1470 | addr: Gpr, |
| 1449 | 1471 | }, |
| 1450 | 1472 | |
| 1473 | pub const Gpr = u64; |
| 1474 | |
| 1451 | 1475 | pub inline fn current() S390x { |
| 1452 | 1476 | var ctx: S390x = undefined; |
| 1453 | 1477 | asm volatile ( |
| ... | ... | @@ -1462,10 +1486,10 @@ const S390x = extern struct { |
| 1462 | 1486 | return ctx; |
| 1463 | 1487 | } |
| 1464 | 1488 | |
| 1465 | | pub fn getFp(ctx: *const S390x) u64 { |
| 1489 | pub fn getFp(ctx: *const S390x) usize { |
| 1466 | 1490 | return ctx.r[11]; |
| 1467 | 1491 | } |
| 1468 | | pub fn getPc(ctx: *const S390x) u64 { |
| 1492 | pub fn getPc(ctx: *const S390x) usize { |
| 1469 | 1493 | return ctx.psw.addr; |
| 1470 | 1494 | } |
| 1471 | 1495 | |
| ... | ... | @@ -1571,10 +1595,10 @@ const Sparc = extern struct { |
| 1571 | 1595 | asm volatile ("ta 3" ::: .{ .memory = true }); // ST_FLUSH_WINDOWS |
| 1572 | 1596 | } |
| 1573 | 1597 | |
| 1574 | | pub fn getFp(ctx: *const Sparc) Gpr { |
| 1598 | pub fn getFp(ctx: *const Sparc) usize { |
| 1575 | 1599 | return ctx.i[6]; |
| 1576 | 1600 | } |
| 1577 | | pub fn getPc(ctx: *const Sparc) Gpr { |
| 1601 | pub fn getPc(ctx: *const Sparc) usize { |
| 1578 | 1602 | return ctx.pc; |
| 1579 | 1603 | } |
| 1580 | 1604 | |
| ... | ... | @@ -1593,8 +1617,10 @@ const Sparc = extern struct { |
| 1593 | 1617 | |
| 1594 | 1618 | /// This is an `extern struct` so that inline assembly in `current` can use field offsets. |
| 1595 | 1619 | const Ve = extern struct { |
| 1596 | | s: [64]u64, |
| 1597 | | ic: u64, |
| 1620 | s: [64]Gpr, |
| 1621 | ic: Gpr, |
| 1622 | |
| 1623 | pub const Gpr = u64; |
| 1598 | 1624 | |
| 1599 | 1625 | pub inline fn current() Ve { |
| 1600 | 1626 | var ctx: Ve = undefined; |
| ... | ... | @@ -1672,10 +1698,10 @@ const Ve = extern struct { |
| 1672 | 1698 | return ctx; |
| 1673 | 1699 | } |
| 1674 | 1700 | |
| 1675 | | pub fn getFp(ctx: *const Ve) u64 { |
| 1701 | pub fn getFp(ctx: *const Ve) usize { |
| 1676 | 1702 | return ctx.s[9]; |
| 1677 | 1703 | } |
| 1678 | | pub fn getPc(ctx: *const Ve) u64 { |
| 1704 | pub fn getPc(ctx: *const Ve) usize { |
| 1679 | 1705 | return ctx.ic; |
| 1680 | 1706 | } |
| 1681 | 1707 | |
| ... | ... | @@ -1693,14 +1719,15 @@ const Ve = extern struct { |
| 1693 | 1719 | }; |
| 1694 | 1720 | |
| 1695 | 1721 | const X86_16 = struct { |
| 1696 | | pub const Register = enum { |
| 1722 | regs: std.enums.EnumArray(GprName, Gpr), |
| 1723 | |
| 1724 | pub const GprName = enum { |
| 1697 | 1725 | // zig fmt: off |
| 1698 | 1726 | sp, bp, ss, |
| 1699 | 1727 | ip, cs, |
| 1700 | 1728 | // zig fmt: on |
| 1701 | 1729 | }; |
| 1702 | | |
| 1703 | | regs: std.enums.EnumArray(Register, u16), |
| 1730 | pub const Gpr = u16; |
| 1704 | 1731 | |
| 1705 | 1732 | pub inline fn current() X86_16 { |
| 1706 | 1733 | var ctx: X86_16 = undefined; |
| ... | ... | @@ -1719,10 +1746,10 @@ const X86_16 = struct { |
| 1719 | 1746 | return ctx; |
| 1720 | 1747 | } |
| 1721 | 1748 | |
| 1722 | | pub fn getFp(ctx: *const X86_16) u16 { |
| 1749 | pub fn getFp(ctx: *const X86_16) usize { |
| 1723 | 1750 | return ctx.regs.get(.bp); |
| 1724 | 1751 | } |
| 1725 | | pub fn getPc(ctx: *const X86_16) u16 { |
| 1752 | pub fn getPc(ctx: *const X86_16) usize { |
| 1726 | 1753 | return ctx.regs.get(.ip); |
| 1727 | 1754 | } |
| 1728 | 1755 | |
| ... | ... | @@ -1740,17 +1767,19 @@ const X86_16 = struct { |
| 1740 | 1767 | }; |
| 1741 | 1768 | |
| 1742 | 1769 | const X86 = struct { |
| 1770 | gprs: std.enums.EnumArray(GprName, Gpr), |
| 1771 | |
| 1743 | 1772 | /// The first 8 registers here intentionally match the order of registers in the x86 instruction |
| 1744 | 1773 | /// encoding. This order is inherited by the PUSHA instruction and the DWARF register mappings, |
| 1745 | 1774 | /// among other things. |
| 1746 | | pub const Gpr = enum { |
| 1775 | pub const GprName = enum { |
| 1747 | 1776 | // zig fmt: off |
| 1748 | 1777 | eax, ecx, edx, ebx, |
| 1749 | 1778 | esp, ebp, esi, edi, |
| 1750 | 1779 | eip, |
| 1751 | 1780 | // zig fmt: on |
| 1752 | 1781 | }; |
| 1753 | | gprs: std.enums.EnumArray(Gpr, u32), |
| 1782 | pub const Gpr = u32; |
| 1754 | 1783 | |
| 1755 | 1784 | pub inline fn current() X86 { |
| 1756 | 1785 | var ctx: X86 = undefined; |
| ... | ... | @@ -1772,10 +1801,10 @@ const X86 = struct { |
| 1772 | 1801 | return ctx; |
| 1773 | 1802 | } |
| 1774 | 1803 | |
| 1775 | | pub fn getFp(ctx: *const X86) u32 { |
| 1804 | pub fn getFp(ctx: *const X86) usize { |
| 1776 | 1805 | return ctx.gprs.get(.ebp); |
| 1777 | 1806 | } |
| 1778 | | pub fn getPc(ctx: *const X86) u32 { |
| 1807 | pub fn getPc(ctx: *const X86) usize { |
| 1779 | 1808 | return ctx.gprs.get(.eip); |
| 1780 | 1809 | } |
| 1781 | 1810 | |
| ... | ... | @@ -1806,10 +1835,12 @@ const X86 = struct { |
| 1806 | 1835 | }; |
| 1807 | 1836 | |
| 1808 | 1837 | const X86_64 = struct { |
| 1838 | gprs: std.enums.EnumArray(GprName, Gpr), |
| 1839 | |
| 1809 | 1840 | /// The order here intentionally matches the order of the DWARF register mappings. It's unclear |
| 1810 | 1841 | /// where those mappings actually originated from---the ordering of the first 4 registers seems |
| 1811 | 1842 | /// quite unusual---but it is currently convenient for us to match DWARF. |
| 1812 | | pub const Gpr = enum { |
| 1843 | pub const GprName = enum { |
| 1813 | 1844 | // zig fmt: off |
| 1814 | 1845 | rax, rdx, rcx, rbx, |
| 1815 | 1846 | rsi, rdi, rbp, rsp, |
| ... | ... | @@ -1818,7 +1849,7 @@ const X86_64 = struct { |
| 1818 | 1849 | rip, |
| 1819 | 1850 | // zig fmt: on |
| 1820 | 1851 | }; |
| 1821 | | gprs: std.enums.EnumArray(Gpr, u64), |
| 1852 | pub const Gpr = u64; |
| 1822 | 1853 | |
| 1823 | 1854 | pub inline fn current() X86_64 { |
| 1824 | 1855 | var ctx: X86_64 = undefined; |