LLVM backend for 6502
Go to file
Chris Lattner 1877ec9b02 For functions that use vector registers, save VRSAVE, mark used
registers, and update it on entry to each function, then restore it on exit.

This compiles:

void func(vfloat *a, vfloat *b, vfloat *c) {
        *a = *b * *c + *c;
}

to this:

_func:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        lvx v0, 0, r5
        lvx v1, 0, r4
        vmaddfp v0, v1, v0, v0
        stvx v0, 0, r3
        mtspr 256, r2
        blr

GCC produces this (which has additional stack accesses):

_func:
        mfspr r0,256
        stw r0,-4(r1)
        oris r0,r0,0xc000
        mtspr 256,r0
        lvx v0,0,r5
        lvx v1,0,r4
        lwz r12,-4(r1)
        vmaddfp v0,v0,v1,v0
        stvx v0,0,r3
        mtspr 256,r12
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 21:52:10 +00:00
autoconf Use -emit-llvm -S to get .ll file output from llvm-gcc 2006-02-27 05:39:00 +00:00
docs Adding an intrinsic is simpler still. 2006-03-09 22:38:42 +00:00
examples Upgrade this to use the new intrinsic names 2006-03-03 01:31:12 +00:00
include/llvm Handle the removal of the debug chain. 2006-03-13 13:07:37 +00:00
lib For functions that use vector registers, save VRSAVE, mark used 2006-03-13 21:52:10 +00:00
projects Convert over to the new way of handling lex/bison checked into cvs 2006-02-15 07:26:07 +00:00
runtime Optimizing to calloc() to malloc() + memset() can be bad on some platforms. 2006-03-13 21:22:43 +00:00
test new testcase 2006-03-13 06:50:47 +00:00
tools Fix a really annoying bug in bugpoint that made reducing C++ testcases 2006-03-08 23:55:38 +00:00
utils fix pasto in generate assertion msg 2006-03-11 00:20:47 +00:00
win32 Put intrinsics.gen in its proper place. 2006-03-10 04:36:01 +00:00
Xcode Catch up on some of the file addition/deletions. 2006-01-27 13:24:20 +00:00
.cvsignore
configure Use -emit-llvm -S to get .ll file output from llvm-gcc 2006-02-27 05:39:00 +00:00
CREDITS.TXT Add an entry 2006-01-08 08:25:38 +00:00
LICENSE.TXT
llvm.spec
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in
Makefile.rules reorder these to make it work with static libraries 2006-03-10 21:01:34 +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.