LLVM backend for 6502
Go to file
Chris Lattner 0ea26ca45b Expand 64-bit shifts more optimally if we know that the high bit of the
shift amount is one or zero.  For example, for:

long long foo1(long long X, int C) {
  return X << (C|32);
}

long long foo2(long long X, int C) {
  return X << (C&~32);
}

we get:

_foo1:
        movb $31, %cl
        movl 4(%esp), %edx
        andb 12(%esp), %cl
        shll %cl, %edx
        xorl %eax, %eax
        ret
_foo2:
        movb $223, %cl
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        andb 12(%esp), %cl
        shldl %cl, %eax, %edx
        shll %cl, %eax
        ret

instead of:

_foo1:
        subl $4, %esp
        movl %ebx, (%esp)
        movb $32, %bl
        movl 8(%esp), %eax
        movl 12(%esp), %edx
        movb %bl, %cl
        orb 16(%esp), %cl
        shldl %cl, %eax, %edx
        shll %cl, %eax
        xorl %ecx, %ecx
        testb %bl, %bl
        cmovne %eax, %edx
        cmovne %ecx, %eax
        movl (%esp), %ebx
        addl $4, %esp
        ret
_foo2:
        subl $4, %esp
        movl %ebx, (%esp)
        movb $223, %cl
        movl 8(%esp), %eax
        movl 12(%esp), %edx
        andb 16(%esp), %cl
        shldl %cl, %eax, %edx
        shll %cl, %eax
        xorl %ecx, %ecx
        xorb %bl, %bl
        testb %bl, %bl
        cmovne %eax, %edx
        cmovne %ecx, %eax
        movl (%esp), %ebx
        addl $4, %esp
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-20 03:38:48 +00:00
autoconf Add a HAVE_MACH_MACH_H #define to detect the presence of the mach/mach.h 2006-09-14 06:17:21 +00:00
docs Make the LLVM Publications link point to /pubs/ since this has moved to 2006-09-17 23:05:15 +00:00
examples Use llvm-config to determine what to link in 2006-09-04 06:04:03 +00:00
include/llvm Fix findCaseDest to return null when BB is both the default dest and one 2006-09-18 20:44:37 +00:00
lib Expand 64-bit shifts more optimally if we know that the high bit of the 2006-09-20 03:38:48 +00:00
projects Fix a race condition in the makefile that broke grawp's tester last night. 2006-08-25 17:15:23 +00:00
runtime Describe and date modifications we made per LGPL requirements. 2006-08-08 14:47:54 +00:00
test Inspired by the linux kernel, the more we keep adds in the pointer realm, the better pointer analysis works. 2006-09-19 18:23:39 +00:00
tools comment out debug code 2006-09-15 23:01:10 +00:00
utils Allow PatFrag to be a leaf node. 2006-09-19 19:08:04 +00:00
win32 Keep Visual Studio happy. 2006-05-03 00:28:50 +00:00
Xcode Adding new files. 2006-09-07 22:07:57 +00:00
.cvsignore
configure Add a HAVE_MACH_MACH_H #define to detect the presence of the mach/mach.h 2006-09-14 06:17:21 +00:00
CREDITS.TXT The list is sorted by name. 2006-08-29 01:42:47 +00:00
LICENSE.TXT burg is gone 2006-09-11 17:28:11 +00:00
llvm.spec.in Minor technical correction in documentation. 2006-08-21 01:58:57 +00:00
Makefile Document build order dependencies. Make sure that llvm-config is built before 2006-09-04 04:27:07 +00:00
Makefile.common
Makefile.config.in Make the name of the project consistent with that specified in the 2006-08-07 23:23:39 +00:00
Makefile.rules Fix a build problem 2006-09-04 06:39:52 +00:00
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level 
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments. 

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.