diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-24 09:57:09 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-24 09:57:09 -0400 |
| commit | 93c7fa105f9cc4dbb36192469ecff47102d955d6 (patch) | |
| tree | 73b1484fbc82d170ec456053d954e241c5280a46 /doc | |
| parent | 5acc8afb5f9674b9b7b290635e9c2837872b8a93 (diff) | |
| parent | 94f7c560015f7cb7ed8046339e2d0724dc86fcd6 (diff) | |
| download | zig-93c7fa105f9cc4dbb36192469ecff47102d955d6.tar.gz zig-93c7fa105f9cc4dbb36192469ecff47102d955d6.zip | |
Merge remote-tracking branch 'origin/llvm10'
LLVM 10 was released today
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 73a6368fe2..cf57aa6b13 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -6159,7 +6159,7 @@ volatile ( // Next is the output constraint string. This feature is still // considered unstable in Zig, and so LLVM/GCC documentation // must be used to understand the semantics. -// http://releases.llvm.org/9.0.0/docs/LangRef.html#inline-asm-constraint-string +// http://releases.llvm.org/10.0.0/docs/LangRef.html#inline-asm-constraint-string // https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html // In this example, the constraint string means "the result value of // this inline assembly instruction is whatever is in $rax". @@ -6200,7 +6200,7 @@ volatile ( <p> Output constraints are still considered to be unstable in Zig, and so - <a href="http://releases.llvm.org/9.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a> + <a href="http://releases.llvm.org/10.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a> and <a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html">GCC documentation</a> must be used to understand the semantics. @@ -6215,7 +6215,7 @@ volatile ( <p> Input constraints are still considered to be unstable in Zig, and so - <a href="http://releases.llvm.org/9.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a> + <a href="http://releases.llvm.org/10.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a> and <a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html">GCC documentation</a> must be used to understand the semantics. @@ -6956,40 +6956,6 @@ pub const CallOptions = struct { }; }; {#code_end#} - - {#header_open|Calling with a New Stack#} - <p> - When the {#syntax#}stack{#endsyntax#} option is provided, instead of using the same stack as the caller, the function uses the provided stack. - </p> - {#code_begin|test|new_stack_call#} -const std = @import("std"); -const assert = std.debug.assert; - -var new_stack_bytes: [1024]u8 align(16) = undefined; - -test "calling a function with a new stack" { - const arg = 1234; - - const a = @call(.{.stack = new_stack_bytes[0..512]}, targetFunction, .{arg}); - const b = @call(.{.stack = new_stack_bytes[512..]}, targetFunction, .{arg}); - _ = targetFunction(arg); - - assert(arg == 1234); - assert(a < b); -} - -fn targetFunction(x: i32) usize { - assert(x == 1234); - - var local_variable: i32 = 42; - const ptr = &local_variable; - ptr.* += 1; - - assert(local_variable == 43); - return @ptrToInt(ptr); -} - {#code_end#} - {#header_close#} {#header_close#} {#header_open|@cDefine#} |
