[llvm-bugs] [Bug 33667] New: lea rdx, [rax - one] adds one instead of subtracts when one is a symbol that has been .set
llvm-bugs at lists.llvm.org
Fri Jun 30 20:49:00 PDT 2017
Bug ID: 33667
Summary: lea rdx, [rax - one] adds one instead of subtracts
when one is a symbol that has been .set
OS: MacOS X
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: mike.benfield at gmail.com
CC: llvm-bugs at lists.llvm.org
In the following example, I would expect both registers rsi and rdx to contain
0, but that is not the case.
$ cat trash.s
.set one, 1
mov rax, 1
lea rsi, [rax - 1]
lea rdx, [rax - one]
lea rdi, [rip + fstring]
sub rsp, 8
add rsp, 8
.asciz "%d, %d\n"
$ clang trash.s
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs