LLVM backend for 6502
Go to file
Chris Lattner 84734ce8ef Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!!  In practice, a simple loop like this:

no_exit:                ; preds = %no_exit, %entry
        %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ]            ; <uint> [#uses=3]
        %tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0          ; <double*> [#uses=1]
        store double 0.000000e+00, double* %tmp.4
        %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
        %exitcond = seteq uint %indvar.next, %N         ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit

was being code gen'd to:

.LBBtest_1:     # no_exit
        movl %edx, %esi
        shll $4, %esi
        movl $0, 4(%eax,%esi)
        movl $0, (%eax,%esi)
        incl %edx
        movl $0, (%eax,%esi)
        movl $0, 4(%eax,%esi)
        cmpl %ecx, %edx
        jne .LBBtest_1  # no_exit

Note that we are doing 4 32-bit stores instead of 2.  Now we generate:

.LBBtest_1:     # no_exit
        movl %edx, %esi
        incl %esi
        shll $4, %edx
        movl $0, (%eax,%edx)
        movl $0, 4(%eax,%edx)
        cmpl %ecx, %esi
        movl %esi, %edx
        jne .LBBtest_1  # no_exit

This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 07:23:39 +00:00
autoconf Remove the "pax" program from the list of those needed to support LLVM. 2005-02-16 16:21:00 +00:00
docs add another plausible reason 2005-02-21 16:35:31 +00:00
examples Use LLVMLIBS=JIT to get JIT libraries 2004-11-29 07:17:18 +00:00
include/llvm Change __MINGW to __MINGW32__. Patch submitted by Henrik Bach. 2005-02-19 03:01:13 +00:00
lib Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code. 2005-02-22 07:23:39 +00:00
projects Update makefile to use PROJ_* makefile variables intead of BUILD_* as 2005-02-14 16:04:28 +00:00
runtime Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd. 2005-01-28 19:37:35 +00:00
test new testcase for PR523 2005-02-21 04:03:32 +00:00
tools Adjust the help output so that it will fit cleanly within 80 columns. 2005-02-18 20:00:05 +00:00
utils Include local time on the web page for start/end times. 2005-02-13 16:08:30 +00:00
win32 Somehow tablegen.exe got moved... fix up tablegen invocations to match. 2005-02-16 05:06:52 +00:00
.cvsignore Ignore the autom4te.cache directoy. 2004-12-24 15:11:23 +00:00
configure Remove the "pax" program from the list of those needed to support LLVM. 2005-02-16 16:21:00 +00:00
CREDITS.TXT New entry. 2005-02-19 17:14:24 +00:00
LICENSE.TXT Another year, another copyright update. 2005-01-08 19:10:44 +00:00
llvm.spec Updated for 1.3. 2004-08-16 15:17:40 +00:00
llvm.spec.in Updated for 1.3. 2004-08-16 15:17:40 +00:00
Makefile Remove the check target. Its now in Makefile.rules 2004-12-06 05:35:00 +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 Remove the "pax" program from the list of those needed to support LLVM. 2005-02-16 16:21:00 +00:00
Makefile.rules Fix installation of configuration files. 2005-02-16 16:17:11 +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.