Skip to content

ARM64 mode: inline assembler clobber registers are still wrongly reported as error #5381

Closed

Description

@RSDuck

Type: LanguageService

Describe the bug

ARM64 registers in the clobber list of inline assembler statements are reported as errors, while x64 registers aren't.

Steps to reproduce
Set intellisenseMode to gcc-arm64 and paste the following code inside a file:

#include <arm_neon.h>
#include <stdint.h>

typedef int32_t s32;

void MatrixMult4x4(s32* m, s32* s)
{
    __asm__ volatile
    (
        :
        :
        : "q0", "x0", "w0", "eax"
    );
}

Expected behavior

It should be the other way around.

Activity

  1. michelleangela commented on Apr 30, 2020

    @michelleangela
    Contributor

    Could you provide the following two logs to help us investigate the issue?

    1. Log output from enabling the language server
    2. Log output from running the command C/C++: Log Diagnostics
  2. sean-mcmanus commented on Apr 30, 2020

    @sean-mcmanus
    Contributor

    In particular, what compiler are you using or are special flags being used? The arm compilers I've tried don't compile that by default.

  3. RSDuck commented on Apr 30, 2020

    @RSDuck
    Author

    I am sorry, the code I provided is invalid, I remove some part to make it more compact, but didn't check if it would still work.

    This is the correct snippet:

    #include <arm_neon.h>
    #include <stdint.h>
    
    typedef int32_t s32;
    
    void MatrixMult4x4(s32* m, s32* s)
    {
        __asm__ volatile
        (
            ""
            :
            :
            : "q0", "x0", "w0", "eax"
        );
    }

    This is my diagnostics log:

    -------- Diagnostics - 30.4.2020, 16:54:06
    Version: 0.28.0-insiders
    Current Configuration:
    {
        "name": "blarg",
        "intelliSenseMode": "gcc-arm64",
        "compilerPath": "C:\\msys64\\opt\\devkitpro\\devkitA64\\bin\\aarch64-none-elf-g++.exe",
        "compilerArgs": [],
        "cStandard": "c11",
        "cppStandard": "c++11",
        "browse": {
            "limitSymbolsToIncludedHeaders": true
        }
    }
    Translation Unit Mappings:
    [ C:\Users\Kemal\Desktop\cpptools_bug5381\main.cpp ]:
        C:\USERS\KEMAL\DESKTOP\CPPTOOLS_BUG5381\MAIN.CPP
    Translation Unit Configurations:
    [ C:\Users\Kemal\Desktop\cpptools_bug5381\main.cpp ]:
        Process ID: 2084
        Memory Usage: 23 MB
        Compiler Path: C:\msys64\opt\devkitpro\devkitA64\bin\aarch64-none-elf-g++.exe
        Includes:
            C:\MSYS64\OPT\DEVKITPRO\DEVKITA64\AARCH64-NONE-ELF\INCLUDE\C++\9.2.0
            C:\MSYS64\OPT\DEVKITPRO\DEVKITA64\AARCH64-NONE-ELF\INCLUDE\C++\9.2.0\AARCH64-NONE-ELF
            C:\MSYS64\OPT\DEVKITPRO\DEVKITA64\AARCH64-NONE-ELF\INCLUDE\C++\9.2.0\BACKWARD
            C:\MSYS64\OPT\DEVKITPRO\DEVKITA64\LIB\GCC\AARCH64-NONE-ELF\9.2.0\INCLUDE
            C:\MSYS64\OPT\DEVKITPRO\DEVKITA64\LIB\GCC\AARCH64-NONE-ELF\9.2.0\INCLUDE-FIXED
            C:\MSYS64\OPT\DEVKITPRO\DEVKITA64\AARCH64-NONE-ELF\INCLUDE
        Standard Version: c++11
        IntelliSense Mode: gcc-arm64
        Other Flags:
            --g++
            --gnu_version=90200
    Total Memory Usage: 23 MB
    
  4. sean-mcmanus commented on Apr 30, 2020

    @sean-mcmanus
    Contributor

    What are the errors? "unknown register name" or something else?

    There's already a bug tracking the unknown register issue at
    #4382
    and
    https://developercommunity.visualstudio.com/content/problem/778258/cc-intellisense-shows-unknown-register-name-with-a.html

  5. RSDuck commented on Apr 30, 2020

    @RSDuck
    Author

    yes, that's the same issue, as the ones you linked, I have to apologise for creating a duplicate issue.

    The only difference is that those were created when there still was no arm/arm64 intellisense mode, i.e. the behaviour shown is correct for x64 intellisense mode.

  6. locked and limited conversation to collaborators on Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions