| ... | ... | @@ -242,10 +242,9 @@ const Aarch64 = extern struct { |
| 242 | 242 | \\ str x1, [x0, #0x0f8] |
| 243 | 243 | \\ adr x1, . |
| 244 | 244 | \\ str x1, [x0, #0x100] |
| 245 | | \\ ldr x1, [x0, #0x008] |
| 246 | 245 | : |
| 247 | 246 | : [ctx] "{x0}" (&ctx), |
| 248 | | : .{ .memory = true }); |
| 247 | : .{ .x1 = true, .memory = true }); |
| 249 | 248 | return ctx; |
| 250 | 249 | } |
| 251 | 250 | |
| ... | ... | @@ -469,10 +468,9 @@ const Hexagon = extern struct { |
| 469 | 468 | \\ memw(r0 + #124) = r31 |
| 470 | 469 | \\ r1 = pc |
| 471 | 470 | \\ memw(r0 + #128) = r1 |
| 472 | | \\ r1 = memw(r0 + #4) |
| 473 | 471 | : |
| 474 | 472 | : [ctx] "{r0}" (&ctx), |
| 475 | | : .{ .memory = true }); |
| 473 | : .{ .r1 = true, .memory = true }); |
| 476 | 474 | return ctx; |
| 477 | 475 | } |
| 478 | 476 | |
| ... | ... | @@ -594,7 +592,6 @@ const LoongArch = extern struct { |
| 594 | 592 | \\ bl 1f |
| 595 | 593 | \\1: |
| 596 | 594 | \\ st.d $ra, $t0, 256 |
| 597 | | \\ ld.d $ra, $t0, 8 |
| 598 | 595 | else |
| 599 | 596 | \\ st.w $zero, $t0, 0 |
| 600 | 597 | \\ st.w $ra, $t0, 4 |
| ... | ... | @@ -631,10 +628,9 @@ const LoongArch = extern struct { |
| 631 | 628 | \\ bl 1f |
| 632 | 629 | \\1: |
| 633 | 630 | \\ st.w $ra, $t0, 128 |
| 634 | | \\ ld.w $ra, $t0, 4 |
| 635 | 631 | : |
| 636 | 632 | : [ctx] "{$r12}" (&ctx), |
| 637 | | : .{ .memory = true }); |
| 633 | : .{ .r1 = true, .memory = true }); |
| 638 | 634 | return ctx; |
| 639 | 635 | } |
| 640 | 636 | |
| ... | ... | @@ -734,7 +730,6 @@ const Mips = extern struct { |
| 734 | 730 | \\ bal 1f |
| 735 | 731 | \\1: |
| 736 | 732 | \\ sd $ra, 256($t0) |
| 737 | | \\ ld $ra, 248($t0) |
| 738 | 733 | \\ .set pop |
| 739 | 734 | else |
| 740 | 735 | \\ .set push |
| ... | ... | @@ -776,11 +771,10 @@ const Mips = extern struct { |
| 776 | 771 | \\ bal 1f |
| 777 | 772 | \\1: |
| 778 | 773 | \\ sw $ra, 128($t4) |
| 779 | | \\ lw $ra, 124($t4) |
| 780 | 774 | \\ .set pop |
| 781 | 775 | : |
| 782 | 776 | : [ctx] "{$12}" (&ctx), |
| 783 | | : .{ .memory = true }); |
| 777 | : .{ .r31 = true, .memory = true }); |
| 784 | 778 | return ctx; |
| 785 | 779 | } |
| 786 | 780 | |
| ... | ... | @@ -916,7 +910,6 @@ const Powerpc = extern struct { |
| 916 | 910 | \\1: |
| 917 | 911 | \\ mflr 8 |
| 918 | 912 | \\ std 8, 256(10) |
| 919 | | \\ ld 8, 64(10) |
| 920 | 913 | else |
| 921 | 914 | \\ stw 0, 0(10) |
| 922 | 915 | \\ stw 1, 4(10) |
| ... | ... | @@ -956,10 +949,9 @@ const Powerpc = extern struct { |
| 956 | 949 | \\1: |
| 957 | 950 | \\ mflr 8 |
| 958 | 951 | \\ stw 8, 128(10) |
| 959 | | \\ lwz 8, 32(10) |
| 960 | 952 | : |
| 961 | 953 | : [ctx] "{r10}" (&ctx), |
| 962 | | : .{ .lr = true, .memory = true }); |
| 954 | : .{ .r8 = true, .lr = true, .memory = true }); |
| 963 | 955 | return ctx; |
| 964 | 956 | } |
| 965 | 957 | |
| ... | ... | @@ -1068,7 +1060,6 @@ const Riscv = extern struct { |
| 1068 | 1060 | \\ jal ra, 1f |
| 1069 | 1061 | \\1: |
| 1070 | 1062 | \\ sd ra, 256(t0) |
| 1071 | | \\ ld ra, 8(t0) |
| 1072 | 1063 | else |
| 1073 | 1064 | \\ sw zero, 0(t0) |
| 1074 | 1065 | \\ sw ra, 4(t0) |
| ... | ... | @@ -1105,10 +1096,9 @@ const Riscv = extern struct { |
| 1105 | 1096 | \\ jal ra, 1f |
| 1106 | 1097 | \\1: |
| 1107 | 1098 | \\ sw ra, 128(t0) |
| 1108 | | \\ lw ra, 4(t0) |
| 1109 | 1099 | : |
| 1110 | 1100 | : [ctx] "{t0}" (&ctx), |
| 1111 | | : .{ .memory = true }); |
| 1101 | : .{ .x1 = true, .memory = true }); |
| 1112 | 1102 | return ctx; |
| 1113 | 1103 | } |
| 1114 | 1104 | |
| ... | ... | @@ -1146,11 +1136,9 @@ const S390x = extern struct { |
| 1146 | 1136 | \\ stm %%r0, %%r1, 128(%%r2) |
| 1147 | 1137 | \\ larl %%r0, . |
| 1148 | 1138 | \\ stg %%r0, 136(%%r2) |
| 1149 | | \\ lg %%r0, 0(%%r2) |
| 1150 | | \\ lg %%r1, 8(%%r2) |
| 1151 | 1139 | : |
| 1152 | 1140 | : [ctx] "{r2}" (&ctx), |
| 1153 | | : .{ .memory = true }); |
| 1141 | : .{ .r0 = true, .r1 = true, .memory = true }); |
| 1154 | 1142 | return ctx; |
| 1155 | 1143 | } |
| 1156 | 1144 | |
| ... | ... | @@ -1458,10 +1446,9 @@ const X86_64 = struct { |
| 1458 | 1446 | \\ movq %%r15, 0x78(%%rdi) |
| 1459 | 1447 | \\ leaq (%%rip), %%rax |
| 1460 | 1448 | \\ movq %%rax, 0x80(%%rdi) |
| 1461 | | \\ movq 0x00(%%rdi), %%rax |
| 1462 | 1449 | : |
| 1463 | 1450 | : [gprs] "{rdi}" (&ctx.gprs.values), |
| 1464 | | : .{ .memory = true }); |
| 1451 | : .{ .rax = true, .memory = true }); |
| 1465 | 1452 | return ctx; |
| 1466 | 1453 | } |
| 1467 | 1454 | |