-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
AArch inline asm: "unknown register name" clobber list #4382
Comments
Thanks for reporting this. I reported it to the VS team at https://developercommunity.visualstudio.com/content/problem/778258/cc-intellisense-shows-unknown-register-name-with-a.html . It's possible we may also need to add support for ARM IntelliSense mode and -std=gnu11 for all the errors to disappear (we have other issues tracking those). |
During WFH about half the developers I work with have been using VSCode and the other half don't use GUI IDEs. A few of us do Linux kernel module development for ARM and MIPS. There is a macro called get_user that obtains one scalar value from user space, and on ARM it expands to inline assembly referencing r0. Every file that has a get_user macro in gets tagged as a problem. |
@cardiffman If you can edit the macro, you may be able to avoid the errors via surrounding the code in a
|
Interesting idea. It makes sense that you would have a macro defined to help with that. |
Happens the same with ARM7: cpptools version: 0.28.1 VSCode version:
Snippets:
Or declaring registers in the clobber section:
|
I think the VS issue at https://developercommunity.visualstudio.com/content/problem/778258/cc-intellisense-shows-unknown-register-name-with-a.html may need more upvotes. |
The Visual Studio issue has been marked as fixed, but as of C/C++ v1.5.1 I am still seeing the issue. Can someone see if it is fixed in Visual Studio? |
Perhaps in VS 2022 beta? |
@Prehistoricman It was never fixed. Someone just assigned it the wrong state temporarily. The issue got closed as low priority, but we're still tracking the issue internally and you can upvote this GitHub issue. |
Any updates on this issue? Is it still tracked and planned in a future release? |
avx2 registers like "ymm0" also fails to be recognized. |
@Victor333Huesca It was closed as "low priority" by the VS team. I'm looking into if we can get it re-activated due to our larger number of embedded users and higher upvote count. |
I'm on Arduino and I'm also getting this, but for |
FYI, I've opened an internal VS issue to track this and mentioned the 12 upvotes. |
@tehKaiN The fix will work for all architectures. |
This fix is available with 1.11.2 (pre-release): https://github.com/microsoft/vscode-cpptools/releases |
unfortunately this doesn't work for me under 1.11.4, screenshot taken just now: same thing with I'm using ms-vscode.cpptools, ms-vscode.cmake-tools and 68000 GCC compiler bundled with bartmanabyss.amiga-debug extension. I understand that you may not want to set up such exotic configuration - can you give me any pointers on how can I find the point of failure for you? |
@tehKaiN Sorry about that -- looks like the "asm("mov w0, #0":::"r0");" case got fixed but not the other case. |
Yes, I do confirm that the inline asm is fixed with arm, thanks! PS: I upvoted the new issue. |
@Victor333Huesca Yes, the error wasn't fixed for register declarations -- we have a potential fix for our next pre-release, pending code review. |
@tehKaiN @Victor333Huesca The register declaration issue is fixed with 1.12.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.12.0 |
Type: LanguageService
The bug
clobber list
ofinline asm
statement. Nevertheless the code successfully compiles and works.To Reproduce
asm("mov w0, #0":::"r0");
Expected behavior
AArch-specific register names must be recognized just like x86's
eax
,rax
and so.Screenshots
The text was updated successfully, but these errors were encountered: