LLVM backend for 6502
Go to file
Chris Lattner 24c8e38455 Allow folding several instructions into casts, which can simplify a lot
of codes.  For example,
short kernel (short t1) {
  t1 >>= 8; t1 <<= 8;
  return t1;
}

became:

short %kernel(short %t1.1) {
        %tmp.3 = shr short %t1.1, ubyte 8               ; <short> [#uses=1]
        %tmp.5 = cast short %tmp.3 to int               ; <int> [#uses=1]
        %tmp.7 = shl int %tmp.5, ubyte 8                ; <int> [#uses=1]
        %tmp.8 = cast int %tmp.7 to short               ; <short> [#uses=1]
        ret short %tmp.8
}

before, now it becomes:
short %kernel(short %t1.1) {
        %tmp.3 = shr short %t1.1, ubyte 8               ; <short> [#uses=1]
        %tmp.8 = shl short %tmp.3, ubyte 8              ; <short> [#uses=1]
        ret short %tmp.8
}

which will become:
short %kernel(short %t1.1) {
        %tmp.3 = and short %t1.1, 0xFF00
        ret short %tmp.3
}

This implements cast-set.ll:test4 and test5


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:35:25 +00:00
autoconf Renamed libtool to mklib for your tab completion pleasure. 2003-07-23 16:52:50 +00:00
docs
include Add support for ~ operator on constants 2003-07-23 17:21:17 +00:00
lib Allow folding several instructions into casts, which can simplify a lot 2003-07-24 17:35:25 +00:00
projects Disable sample project until it works 2003-07-23 23:28:57 +00:00
runtime
support Simplify code by using ConstantInt::getRawValue instead of checking to see 2003-07-23 15:22:26 +00:00
test Add new tests, make existing tests more difficult 2003-07-23 23:21:08 +00:00
tools
utils
configure Renamed libtool to mklib for your tab completion pleasure. 2003-07-23 16:52:50 +00:00
LICENSE.TXT
Makefile
Makefile.common Renamed libtool to mklib for your tab completion pleasure. 2003-07-23 16:52:50 +00:00
Makefile.config.in
Makefile.rules Renamed libtool to mklib for your tab completion pleasure. 2003-07-23 16:52:50 +00:00