| ... | ... | @@ -28,8 +28,10 @@ fn clear_cache(start: usize, end: usize) callconv(.C) void { |
| 28 | 28 | .aarch64, .aarch64_be => true, |
| 29 | 29 | else => false, |
| 30 | 30 | }; |
| 31 | | const loongarch64 = switch (arch) { |
| 32 | | .loongarch64 => true, |
| 31 | const loongarch = switch (arch) { |
| 32 | .loongarch32, |
| 33 | .loongarch64, |
| 34 | => true, |
| 33 | 35 | else => false, |
| 34 | 36 | }; |
| 35 | 37 | const mips = switch (arch) { |
| ... | ... | @@ -163,7 +165,7 @@ fn clear_cache(start: usize, end: usize) callconv(.C) void { |
| 163 | 165 | // On Darwin, sys_icache_invalidate() provides this functionality |
| 164 | 166 | sys_icache_invalidate(start, end - start); |
| 165 | 167 | exportIt(); |
| 166 | | } else if (os == .linux and loongarch64) { |
| 168 | } else if (os == .linux and loongarch) { |
| 167 | 169 | // See: https://github.com/llvm/llvm-project/blob/cf54cae26b65fc3201eff7200ffb9b0c9e8f9a13/compiler-rt/lib/builtins/clear_cache.c#L94-L95 |
| 168 | 170 | asm volatile ( |
| 169 | 171 | \\ ibar 0 |