mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-10 15:04:59 +00:00
noStackFrame -> asmNoStackFrame
This commit is contained in:
@@ -2335,7 +2335,7 @@ Nimrod identifiers shall be enclosed in a special character which can be
|
||||
specified in the statement's pragmas. The default special character is ``'`'``:
|
||||
|
||||
.. code-block:: nimrod
|
||||
proc addInt(a, b: int): int {.noStackFrame.} =
|
||||
proc addInt(a, b: int): int {.asmNoStackFrame.} =
|
||||
# a in eax, and b in edx
|
||||
asm """
|
||||
mov eax, `a`
|
||||
|
||||
@@ -360,7 +360,7 @@ Example:
|
||||
static int cvariable = 420;
|
||||
""".}
|
||||
|
||||
proc embedsC() {.noStackFrame.} =
|
||||
proc embedsC() {.asmNoStackFrame.} =
|
||||
var nimrodVar = 89
|
||||
# use backticks to access Nimrod symbols within an emit section:
|
||||
{.emit: """fprintf(stdout, "%d\n", cvariable + (int)`nimrodVar`);""".}
|
||||
|
||||
@@ -801,7 +801,7 @@ elif not defined(useNimRtl):
|
||||
proc startProcessAfterFork(data: ptr TStartProcessData) =
|
||||
# Warning: no GC here!
|
||||
# Or anythink that touches global structures - all called nimrod procs
|
||||
# must be marked with noStackFrame. Inspect C code after making changes.
|
||||
# must be marked with asmNoStackFrame. Inspect C code after making changes.
|
||||
if not data.optionPoParentStreams:
|
||||
discard close(data.pStdin[writeIdx])
|
||||
if dup2(data.pStdin[readIdx], readIdx) < 0:
|
||||
|
||||
Reference in New Issue
Block a user