mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
update docs
This commit is contained in:
parent
8a478b4e9e
commit
c2fa961b63
3 changed files with 5 additions and 6 deletions
|
|
@ -53,8 +53,7 @@ pub fn syscall1(number: usize, arg1: usize) usize {
|
||||||
// memory locations - not only the memory pointed to by a declared indirect
|
// memory locations - not only the memory pointed to by a declared indirect
|
||||||
// output. In this example we list $rcx and $r11 because it is known the
|
// output. In this example we list $rcx and $r11 because it is known the
|
||||||
// kernel syscall does not preserve these registers.
|
// kernel syscall does not preserve these registers.
|
||||||
: "rcx", "r11"
|
: .{ .rcx = true, .r11 = true });
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// syntax
|
// syntax
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@ pub fn syscall1(number: usize, arg1: usize) usize {
|
||||||
: [ret] "={rax}" (-> usize),
|
: [ret] "={rax}" (-> usize),
|
||||||
: [number] "{rax}" (number),
|
: [number] "{rax}" (number),
|
||||||
[arg1] "{rdi}" (arg1),
|
[arg1] "{rdi}" (arg1),
|
||||||
: "rcx", "r11"
|
: .{ .rcx = true, .r11 = true });
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize {
|
pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize {
|
||||||
|
|
@ -26,8 +25,7 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize {
|
||||||
[arg1] "{rdi}" (arg1),
|
[arg1] "{rdi}" (arg1),
|
||||||
[arg2] "{rsi}" (arg2),
|
[arg2] "{rsi}" (arg2),
|
||||||
[arg3] "{rdx}" (arg3),
|
[arg3] "{rdx}" (arg3),
|
||||||
: "rcx", "r11"
|
: .{ .rcx = true, .r11 = true });
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// exe=succeed
|
// exe=succeed
|
||||||
|
|
|
||||||
|
|
@ -787,6 +787,8 @@ fn expr(w: *Walk, scope: *Scope, parent_decl: Decl.Index, node: Ast.Node.Index)
|
||||||
try expr(w, scope, parent_decl, full.ast.template);
|
try expr(w, scope, parent_decl, full.ast.template);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
.asm_legacy => {},
|
||||||
|
|
||||||
.builtin_call_two,
|
.builtin_call_two,
|
||||||
.builtin_call_two_comma,
|
.builtin_call_two_comma,
|
||||||
.builtin_call,
|
.builtin_call,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue