mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
21b3f31f8f
commit
fd1074f171
@ -1553,30 +1553,6 @@ abs:
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Consider:
|
||||
|
||||
#include <inttypes.h>
|
||||
uint64_t a;
|
||||
uint16_t b;
|
||||
uint64_t mul(void) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
Currently, we generate the following:
|
||||
|
||||
mul:
|
||||
movzwl b, %ecx
|
||||
movl %ecx, %eax
|
||||
mull a
|
||||
imull a+4, %ecx
|
||||
addl %edx, %ecx
|
||||
movl %ecx, %edx
|
||||
ret
|
||||
|
||||
llvm should be able to commute the addl so that the movl isn't necessary.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Consider:
|
||||
int test(unsigned long a, unsigned long b) { return -(a < b); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user