Fixed regression on ARM caused by the changed behaviour of noStackFrame in commit ac474a2812.

This commit is contained in:
Dominik Picheta
2013-10-19 21:01:32 +01:00
parent eb4f012239
commit 199c4d21bd
3 changed files with 6 additions and 5 deletions

View File

@@ -4673,9 +4673,10 @@ A proc can be marked with the `noStackFrame`:idx: pragma to tell the compiler
it should not generate a stack frame for the proc. There are also no exit
statements like ``return result;`` generated and the generated C function is
declared as ``__declspec(naked)`` or ``__attribute__((naked))`` (depending on
the used C compiler). This is useful for procs that only consist of an
assembler statement.
the used C compiler).
**Note**: This pragma should only be used by procs which consist solely of assembler
statements.
error pragma
------------

View File

@@ -1791,7 +1791,7 @@ when defined(JS):
elif hostOS != "standalone":
{.push stack_trace:off, profiler:off.}
proc add*(x: var string, y: cstring) {.noStackFrame.} =
proc add*(x: var string, y: cstring) =
var i = 0
while y[i] != '\0':
add(x, y[i])

View File

@@ -9,9 +9,9 @@ static int cvariable = 420;
""".}
proc embedsC() {.noStackFrame.} =
proc embedsC() =
var nimrodVar = 89
{.emit: """fprintf(stdout, "%d\n", cvariable + (int)`nimrodVar`);""".}
{.emit: """printf("%d\n", cvariable + (int)`nimrodVar`);""".}
embedsC()