diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-23 04:39:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-23 04:39:44 +0000 |
commit | 90b7c13f3a25c931a31638f458153d7c5733c2f2 (patch) | |
tree | bbe87aaebde7eaa7108a1be4cfd5b4e6e61fa54c /llvm/lib/Support/FileUtilities.cpp | |
parent | ffcb0ae3291afe795d5b00d8cab0afef2103a024 (diff) | |
download | bcm5719-llvm-90b7c13f3a25c931a31638f458153d7c5733c2f2.tar.gz bcm5719-llvm-90b7c13f3a25c931a31638f458153d7c5733c2f2.zip |
Remove the 3 HACK HACK HACKs I put in before, fixing them properly with
the new TLI that is available.
Implement support for handling out of range shifts. This allows us to
compile this code (a 64-bit rotate):
unsigned long long f3(unsigned long long x) {
return (x << 32) | (x >> (64-32));
}
into this:
f3:
mov %EDX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
ret
GCC produces this:
$ gcc t.c -masm=intel -O3 -S -o - -fomit-frame-pointer
..
f3:
push %ebx
mov %ebx, DWORD PTR [%esp+12]
mov %ecx, DWORD PTR [%esp+8]
mov %eax, %ebx
mov %edx, %ecx
pop %ebx
ret
The Simple ISEL produces (eww gross):
f3:
sub %ESP, 4
mov DWORD PTR [%ESP], %ESI
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, DWORD PTR [%ESP + 12]
mov %EAX, 0
mov %ESI, 0
or %EAX, %ECX
or %EDX, %ESI
mov %ESI, DWORD PTR [%ESP]
add %ESP, 4
ret
llvm-svn: 19780
Diffstat (limited to 'llvm/lib/Support/FileUtilities.cpp')
0 files changed, 0 insertions, 0 deletions