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

Clobbers in assembly inline #184

Open
r00t0s opened this issue Oct 22, 2023 · 0 comments
Open

Clobbers in assembly inline #184

r00t0s opened this issue Oct 22, 2023 · 0 comments

Comments

@r00t0s
Copy link

r00t0s commented Oct 22, 2023

define void @disasm() {
entry:
  %0 = tail call i64 asm "", "={rsp},~{dirflag},~{fpsr},~{flags}"() #0
  %1 = add i64 %0, 56
  tail call void asm "", "{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %1) #0
  ret void
}

Is translated to:

void disasm(void) {
  uint64_t _1;
  uint64_t _2;

  __asm__ volatile (""
        :
        :);
  _2 = llvm_add_u64(_1, 56);
  __asm__ volatile (""
        :
        :);
}

Looks like it not add that clobbers ={rsp},{dirflag},{fpsr},~{flags} and dont use assembly variables

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