| ... | ... | @@ -1188,6 +1188,28 @@ const LinuxThreadImpl = struct { |
| 1188 | 1188 | [len] "r" (self.mapped.len), |
| 1189 | 1189 | : "memory" |
| 1190 | 1190 | ), |
| 1191 | .sparc => asm volatile ( |
| 1192 | \\ # See sparc64 comments below. |
| 1193 | \\ 1: |
| 1194 | \\ cmp %%fp, 0 |
| 1195 | \\ beq 2f |
| 1196 | \\ nop |
| 1197 | \\ ba 1b |
| 1198 | \\ restore |
| 1199 | \\ 2: |
| 1200 | \\ mov 73, %%g1 # SYS_munmap |
| 1201 | \\ mov %[ptr], %%o0 |
| 1202 | \\ mov %[len], %%o1 |
| 1203 | \\ t 0x3 # ST_FLUSH_WINDOWS |
| 1204 | \\ t 0x10 |
| 1205 | \\ mov 1, %%g1 # SYS_exit |
| 1206 | \\ mov 0, %%o0 |
| 1207 | \\ t 0x10 |
| 1208 | : |
| 1209 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), |
| 1210 | [len] "r" (self.mapped.len), |
| 1211 | : "memory" |
| 1212 | ), |
| 1191 | 1213 | .sparc64 => asm volatile ( |
| 1192 | 1214 | \\ # SPARCs really don't like it when active stack frames |
| 1193 | 1215 | \\ # is unmapped (it will result in a segfault), so we |