LLVM backend for 6502
Go to file
Chris Lattner e70da20f9a implement a readme entry, compiling the code into:
_foo:
	movl	$12, %eax
	andl	4(%esp), %eax
	movl	_array(%eax), %eax
	ret

instead of:

_foo:
	movl	4(%esp), %eax
	shrl	$2, %eax
	andl	$3, %eax
	movl	_array(,%eax,4), %eax
	ret

As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:

-       movl    8(%eax), %eax
-       shll    $2, %eax
-       andl    $1020, %eax
-       movl    (%esi,%eax), %eax
+       movzbl  8(%eax), %eax
+       movl    (%esi,%eax,4), %eax


-       shll    $2, %edx
-       andl    $1020, %edx
-       movl    (%edi,%edx), %edx
+       andl    $255, %edx
+       movl    (%edi,%edx,4), %edx

Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:

-       andl    $85, %ebx
-       addl    _bit_count(,%ebx,4), %ebp
+       shll    $2, %ebx
+       andl    $340, %ebx
+       addl    _bit_count(%ebx), %ebp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 07:33:36 +00:00
autoconf Minor updates: 2007-12-05 21:23:16 +00:00
bindings Track dependencies when creating symlinks to LLVM libraries next 2007-12-03 21:15:53 +00:00
docs Fixed typo. 2007-12-03 19:34:25 +00:00
examples add a new BF->LLVM translator, contributed by Sterling Stein. 2007-09-12 18:24:00 +00:00
include add a new ExecutionEngine::createJIT which can be used if you only want 2007-12-06 01:34:04 +00:00
lib implement a readme entry, compiling the code into: 2007-12-06 07:33:36 +00:00
projects Convert .cvsignore files 2007-06-29 16:35:07 +00:00
runtime GarbageCollection.html is expanded to encompass the coming 2007-09-27 19:31:36 +00:00
test implement a readme entry, compiling the code into: 2007-12-06 07:33:36 +00:00
tools Rather than having special rules like "intrinsics cannot 2007-12-03 20:06:50 +00:00
utils Rather than having special rules like "intrinsics cannot 2007-12-03 20:06:50 +00:00
website Prepare for "core" website. 2007-08-03 05:43:35 +00:00
win32 Adjust VStudio files to add JITMemoryManager files + include <cassert> from same. 2007-12-06 02:03:01 +00:00
Xcode Removing a dead reference from LLVM.xcodeproj. 2007-11-04 16:12:17 +00:00
build-for-llvm-top.sh Allow the configure options to be set according to the llvm-top options. 2007-08-31 19:53:42 +00:00
configure Regenerated configure after autoconf/configure.ac change. 2007-12-05 21:24:02 +00:00
CREDITS.TXT Alphabetizing; I want to be the last in the file!!!! ;-) 2007-12-05 21:26:54 +00:00
LICENSE.TXT Updated source file headers to llvm coding standard. 2007-12-05 01:40:25 +00:00
llvm.spec.in * llvm.spec.in: update blurb 2007-07-13 09:48:29 +00:00
Makefile Adding ocaml language bindings for the vmcore and bitwriter libraries. These are 2007-09-18 12:49:39 +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 Providing --with-ocaml-libdir for ./configure. The default is the 2007-10-02 16:42:10 +00:00
Makefile.rules noone uses etags. Connected to PR1601 2007-09-26 06:10:47 +00:00
ModuleInfo.txt Update to include clean and install commands. 2007-07-20 20:54:41 +00:00
README.txt test 2007-04-20 20:49:25 +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.