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