LLVM backend for 6502
Go to file
Chris Lattner 26d2990e03 Lower X%C into X/C+stuff. This allows the 'division by a constant' logic to
apply to rems as well as divs.  This fixes PR945 and speeds up ReedSolomon
from 14.57s to 10.90s (which is now faster than gcc).

It compiles CodeGen/X86/rem.ll into:

_test1:
        subl $4, %esp
        movl %esi, (%esp)
        movl $2155905153, %ecx
        movl 8(%esp), %esi
        movl %esi, %eax
        imull %ecx
        addl %esi, %edx
        movl %edx, %eax
        shrl $31, %eax
        sarl $7, %edx
        addl %eax, %edx
        imull $255, %edx, %eax
        subl %eax, %esi
        movl %esi, %eax
        movl (%esp), %esi
        addl $4, %esp
        ret
_test2:
        movl 4(%esp), %eax
        movl %eax, %ecx
        sarl $31, %ecx
        shrl $24, %ecx
        addl %eax, %ecx
        andl $4294967040, %ecx
        subl %ecx, %eax
        ret
_test3:
        subl $4, %esp
        movl %esi, (%esp)
        movl $2155905153, %ecx
        movl 8(%esp), %esi
        movl %esi, %eax
        mull %ecx
        shrl $7, %edx
        imull $255, %edx, %eax
        subl %eax, %esi
        movl %esi, %eax
        movl (%esp), %esi
        addl $4, %esp
        ret

instead of div/idiv instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30920 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:58:32 +00:00
autoconf Fix misleading warning message 2006-10-02 17:23:42 +00:00
docs Clean-up of formatting and spelling. 2006-10-11 18:00:22 +00:00
examples Use llvm-config to determine what to link in 2006-09-04 06:04:03 +00:00
include/llvm Add RemoveDeadNode to remove a dead node and its (potentially) dead operands. 2006-10-12 20:34:05 +00:00
lib Lower X%C into X/C+stuff. This allows the 'division by a constant' logic to 2006-10-12 20:58:32 +00:00
projects Don't build the runtime library if LLVMGCC is not configured. 2006-10-02 19:10:56 +00:00
runtime Describe and date modifications we made per LGPL requirements. 2006-08-08 14:47:54 +00:00
test new testcase 2006-10-12 20:56:15 +00:00
tools Make the bugpoint reduction heuristics more effective. Patch submitted by 2006-10-10 21:42:25 +00:00
utils Use RemoveDeadNode to kill dead node. 2006-10-12 20:35:19 +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 Ignore stuff built by "make dist". 2006-04-07 15:55:18 +00:00
configure fix misleading warning 2006-10-02 17:24:55 +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 Update comments to reflect new variable names. Patch contributed by 2005-02-14 16:02:19 +00:00
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 Move CompileCommonOpts to the end of the list so that EXTRA_OPTIONS=-O0 will 2006-09-29 18:47:13 +00:00
README.txt Make the text of this file a little more useful. 2004-09-02 22:49:27 +00:00

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.