diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-01-18 14:09:47 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-01-19 02:15:30 +0100 |
| commit | 8a78d875cc1cdab2648e7413fc0d2eea5afc6991 (patch) | |
| tree | 57301c426505167cbe1580e2912304fe2a5483ac /lib/std/os/linux/mips64.zig | |
| parent | 4de661ef18d4cdc7f859c8bc1990e8a0519163db (diff) | |
| download | zig-8a78d875cc1cdab2648e7413fc0d2eea5afc6991.tar.gz zig-8a78d875cc1cdab2648e7413fc0d2eea5afc6991.zip | |
std.os.linux: Don't emit CFI directives if unwind tables are disabled.
Diffstat (limited to 'lib/std/os/linux/mips64.zig')
| -rw-r--r-- | lib/std/os/linux/mips64.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/std/os/linux/mips64.zig b/lib/std/os/linux/mips64.zig index 256c911bbe..0d0a1104c1 100644 --- a/lib/std/os/linux/mips64.zig +++ b/lib/std/os/linux/mips64.zig @@ -1,3 +1,4 @@ +const builtin = @import("builtin"); const std = @import("../../std.zig"); const maxInt = std.math.maxInt; const linux = std.os.linux; @@ -210,7 +211,11 @@ pub fn clone() callconv(.Naked) usize { \\ jr $ra \\ nop \\1: + ); + if (builtin.unwind_tables != .none or !builtin.strip_debug_info) asm volatile ( \\ .cfi_undefined $ra + ); + asm volatile ( \\ move $fp, $zero \\ move $ra, $zero \\ |
