Skip to content
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

clang-cl error: instruction requires: 64-bit mode #20590

Open
ehsan opened this issue Jul 5, 2014 · 1 comment
Open

clang-cl error: instruction requires: 64-bit mode #20590

ehsan opened this issue Jul 5, 2014 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category

Comments

@ehsan
Copy link
Contributor

ehsan commented Jul 5, 2014

Bugzilla Link 20216
Version trunk
OS All
CC @majnemer,@zmodem,@jrmuizel,@rnk,@rinon

Extended Description

$ cat test.c
void f() {
char file[] = "";
__asm lea eax, file
}

Ehsan Akhgari@WIN-LD01V6P651K /c/moz/src/obj-ff-clangcl/gfx/cairo/cairo/src
$ clang-cl -c test.c
(2,2) : error: instruction requires: 64-bit mode
lea eax, byte ptr file
^
1 error generated.

@ehsan
Copy link
Contributor Author

ehsan commented Jul 6, 2014

The issue is that in Sema::LookupInlineAsmIdentifier, we look at the type of file and notice that it's an array type, so we set the size according to the size of the array (in this test case the size will be 1 which causes us to rewrite this and add a byte ptr.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

1 participant