llvm-6502/lib/Target
Vikram S. Adve 951df2b1bd Several important bug fixes:
(1) Cannot use ANDN(ot), ORN, and XORN for boolean ops, only bitwise ops.

(2) Conditional move instructions must distinguish signed and unsigned
    condition codes, e.g., MOVLE vs. MOVLEU.

(3) Conditional-move-on-register was using the cond-move-on-cc opcodes,
    which produces a valid-looking instruction with bogus registers!

(4) Here's a really cute one: dividing-by-2^k for negative numbers needs to
    add 2^k-1 before shifting, not add 1 after shifting.  Sadly, these
    are the same when k=0 so our poor test case worked fine.

(5) Casting between signed and unsigned values was not correct:
    completely reimplemented.

(6) Zero-extension on unsigned values was bogus: I was only doing the
    SRL and not the SLLX before it.  Don't know WHAT I was thinking!

(7) And the most important class of changes: Sign-extensions on signed values.
    Signed values are not sign-extended after ordinary operations,
    so they must be sign-extended before the following cases:
	-- passing to an external or unknown function
	-- returning from a function
	-- using as operand 2 of DIV or REM
	-- using as either operand of condition-code setting operation
           (currently only SUBCC), with smaller than 32-bit operands


Also, a couple of improvements:

(1) Fold cast-to-bool into Not(bool).  Need to do this for And, Or, XOR also.

(2) Convert SetCC-Const into a conditional-move-on-register (case 41)
    if the constant is 0.  This was only being done for branch-on-SetCC-Const
    when the branch is folded with the SetCC-Const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7159 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 20:07:54 +00:00
..
CBackend Some beautification changes (tabs to spaces, removed extra blank lines); 2003-07-09 17:33:50 +00:00
SparcV9 Several important bug fixes: 2003-07-10 20:07:54 +00:00
X86 Insert workaround for GAS bug in assembling FLD/FSTP XWORD PTR [...] 2003-07-07 18:34:20 +00:00
Makefile X86 target builds fine now 2002-11-20 20:17:03 +00:00
MRegisterInfo.cpp Capture more information in ctor 2002-12-28 20:34:18 +00:00
Target.td Added the target-independent part of TableGen data. 2003-05-29 18:48:17 +00:00
TargetData.cpp No really, you _cannot use_ getelementptr on an unsized type: that makes 2003-06-04 02:35:35 +00:00
TargetInstrInfo.cpp Nice tasty llc fixes. These should fix LLC for x86 for everything in 2003-06-27 00:00:48 +00:00
TargetMachine.cpp The promotion rules are the same for all targets, they are set by the C standard. 2003-04-26 19:47:36 +00:00
TargetSchedInfo.cpp More renamings of Target/Machine*Info to Target/Target*Info 2002-12-29 03:13:05 +00:00