mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
compiler-rt: Use loongarch clear_cache() implementation for loongarch32 too.
This commit is contained in:
parent
f5beb50619
commit
dd983e12aa
1 changed files with 5 additions and 3 deletions
|
|
@ -28,8 +28,10 @@ fn clear_cache(start: usize, end: usize) callconv(.C) void {
|
|||
.aarch64, .aarch64_be => true,
|
||||
else => false,
|
||||
};
|
||||
const loongarch64 = switch (arch) {
|
||||
.loongarch64 => true,
|
||||
const loongarch = switch (arch) {
|
||||
.loongarch32,
|
||||
.loongarch64,
|
||||
=> true,
|
||||
else => false,
|
||||
};
|
||||
const mips = switch (arch) {
|
||||
|
|
@ -163,7 +165,7 @@ fn clear_cache(start: usize, end: usize) callconv(.C) void {
|
|||
// On Darwin, sys_icache_invalidate() provides this functionality
|
||||
sys_icache_invalidate(start, end - start);
|
||||
exportIt();
|
||||
} else if (os == .linux and loongarch64) {
|
||||
} else if (os == .linux and loongarch) {
|
||||
// See: https://github.com/llvm/llvm-project/blob/cf54cae26b65fc3201eff7200ffb9b0c9e8f9a13/compiler-rt/lib/builtins/clear_cache.c#L94-L95
|
||||
asm volatile (
|
||||
\\ ibar 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue