-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on literal strings #11
Comments
I can confirm this. This compiles: int main(void) {
int n = 37, a, b, c, x, y;
asm("HWQ %2\n"
"SET %0, A\n"
"SET %1, B"
: "=g" (a),
"=g" (b)
: "r" (n)
: "A", "B", "C", "X", "Y");
return a;
} However, this does not: int main(void) {
int n = 37, a, b, c, x, y;
asm("HWQ %3\n"
"SET %0, A\n"
"SET %1, B\n"
"SET %2, C"
: "=g" (a),
"=g" (b),
"=g" (c)
: "r" (n)
: "A", "B", "C", "X", "Y");
return a;
} And the error is:
I am on llvm-dcpu commit f9c275e351529b37996e31e36444b43e6707bfeb, which I believe is the latest available. |
Came her to report this very same issue, with a code snippet that does the same thing, using aaf7a21 and llvm-dcpu16/llvm-dcpu16@f9c275e. Good to know it's a known issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following program crashes while being parsed (?) by clang:
If the asm string is concatenated into one line (
"HWQ %5\nSET %0, A\nSET %1, B\nSET %2, C\nSET %3, X\nSET %4, Y"
), everything works as it should.The text was updated successfully, but these errors were encountered: