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

Flowistry does not understand inline assembly #46

Open
nico-abram opened this issue Mar 28, 2022 · 0 comments
Open

Flowistry does not understand inline assembly #46

nico-abram opened this issue Mar 28, 2022 · 0 comments

Comments

@nico-abram
Copy link

For the following function:

pub unsafe fn load_u8(p: *const u8) -> u8 {
    let mut ret: u8;
    std::arch::asm!(
        "mov {ret}, byte ptr [{p}]",
        p = in(reg) p,
        ret = lateout(reg_byte) ret, 
        options(nostack)
    );
    ret
}

Flowistry does not highlight the use of "p" in the asm! invocation:
imagen
It also does not highlight that ret is written to by it:
imagen

Since in(reg) p and lateout(reg_byte) ret explicitly specify those 2 things, it should be possible to recognize these. The rust reference has a page explaining the asm! syntax: https://doc.rust-lang.org/nightly/reference/inline-assembly.html

Tested only with the vscode marketplace extension on windows 10 21H2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant