remove unnecessary ud2 instructions

This commit is contained in:
2025-12-17 11:15:51 +01:00
parent 403fd6031b
commit eea0e6204d
3 changed files with 1 additions and 9 deletions

View File

@@ -74,12 +74,10 @@ export fn syscall_handler(ctx: *SavedContext) callconv(.c) void {
asm volatile ( asm volatile (
\\ mov %[rsp], %%rsp \\ mov %[rsp], %%rsp
\\ syscall \\ syscall
\\ ud2
: :
: [rsp] "r" (rsp_orig), : [rsp] "r" (rsp_orig),
[number] "{rax}" (ctx.rax), [number] "{rax}" (ctx.rax),
: .{ .memory = true } : .{ .memory = true });
);
unreachable; unreachable;
}, },
.execve, .execveat => |s| { .execve, .execveat => |s| {

View File

@@ -30,9 +30,6 @@ pub fn main() !void {
\\ mov $60, %%rax # SYS_exit \\ mov $60, %%rax # SYS_exit
\\ syscall \\ syscall
\\ \\
\\ # Should not be reached
\\ ud2
\\
\\ 1: \\ 1:
\\ # Parent Path continues \\ # Parent Path continues
: [ret] "={rax}" (-> usize), : [ret] "={rax}" (-> usize),

View File

@@ -34,9 +34,6 @@ pub fn main() !void {
\\ mov $60, %%rax # SYS_exit \\ mov $60, %%rax # SYS_exit
\\ syscall \\ syscall
\\ \\
\\ # Should not be reached
\\ ud2
\\
\\ 1: \\ 1:
\\ # Parent Path continues \\ # Parent Path continues
: [ret] "={rax}" (-> usize), : [ret] "={rax}" (-> usize),