Skip to content

Clobbers in assembly inline #184

Open
@r00t0s

Description

@r00t0s
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions