remove unnecessary ud2 instructions
This commit is contained in:
@@ -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| {
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user