| ... | @@ -1283,6 +1283,18 @@ const LinuxThreadImpl = struct { | ... | @@ -1283,6 +1283,18 @@ const LinuxThreadImpl = struct { |
| 1283 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), | 1283 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), |
| 1284 | [len] "r" (self.mapped.len), | 1284 | [len] "r" (self.mapped.len), |
| 1285 | : .{ .memory = true }), | 1285 | : .{ .memory = true }), |
| | 1286 | .microblaze, .microblazeel => asm volatile ( |
| | 1287 | \\ ori r12, r0, 91 # SYS_munmap |
| | 1288 | \\ ori r5, %[ptr], 0 |
| | 1289 | \\ ori r6, %[len], 0 |
| | 1290 | \\ brki r14, 0x8 |
| | 1291 | \\ ori r12, r0, 1 # SYS_exit |
| | 1292 | \\ or r5, r0, r0 |
| | 1293 | \\ brki r14, 0x8 |
| | 1294 | : |
| | 1295 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), |
| | 1296 | [len] "r" (self.mapped.len), |
| | 1297 | : .{ .memory = true }), |
| 1286 | // We set `sp` to the address of the current function as a workaround for a Linux | 1298 | // We set `sp` to the address of the current function as a workaround for a Linux |
| 1287 | // kernel bug that caused syscalls to return EFAULT if the stack pointer is invalid. | 1299 | // kernel bug that caused syscalls to return EFAULT if the stack pointer is invalid. |
| 1288 | // The bug was introduced in 46e12c07b3b9603c60fc1d421ff18618241cb081 and fixed in | 1300 | // The bug was introduced in 46e12c07b3b9603c60fc1d421ff18618241cb081 and fixed in |