You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mtest.nim.c:104:5: error: expected ')'
: "=r" (dst)
^
mtest.nim.c:102:5: note: to match this '('
asm(" mov %1, %0\n\t\n"
^
1 error generated.
Expected Output
42
Possible Solution
I have a PR with the following change and a test, however this definitely feels out of my depth
In extccomp.nim, under compiler gcc:, replace
asmStmtFrmt: "asm($1);$n",
with
asmStmtFrmt: "__asm__($1);$n",
$ nim -v
Nim Compiler Version 1.7.1 [MacOSX: amd64]
Compiled at 2022-07-10
Copyright (c) 2006-2022 by Andreas Rumpf
git hash: e8ee2f9c2ad06cad2f62fe7505acbb43530f28d7
The text was updated successfully, but these errors were encountered:
* replace gcc asm with __asm__ and add a test
* update test case to specify gcc or clang and not cpp
Co-authored-by: daniel <danielclarke@wearepopgun.com>
capocasa
pushed a commit
to capocasa/Nim
that referenced
this issue
Mar 31, 2023
* replace gcc asm with __asm__ and add a test
* update test case to specify gcc or clang and not cpp
Co-authored-by: daniel <danielclarke@wearepopgun.com>
Calls to extended
asm
fail to compile with gcc whenstd=c99
compiler flag is setExample
Current Output
Expected Output
Possible Solution
I have a PR with the following change and a test, however this definitely feels out of my depth
In
extccomp.nim
, undercompiler gcc:
, replaceasmStmtFrmt: "asm($1);$n",
with
asmStmtFrmt: "__asm__($1);$n",
The text was updated successfully, but these errors were encountered: