llvm-6502/lib/Target/SparcV9
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
..
InstrSched
InstrSelection
LiveVar
ModuloScheduling
RegAlloc isMarkedForSpill() should be const. 2003-07-10 19:45:28 +00:00
.cvsignore
EmitBytecodeToAssembly.cpp
MachineCodeForInstruction.h
MachineFunctionInfo.h
MachineInstrAnnot.h Values stored in CallArgsDescriptor cannot be const. 2003-07-10 19:46:15 +00:00
Makefile
MappingInfo.cpp
MappingInfo.h
SparcV9_F2.td
SparcV9_F3.td
SparcV9_F4.td
SparcV9_Reg.td
SparcV9.burg.in Fold cast-to-bool into not. Later, this should also be folded into other 2003-07-10 19:47:42 +00:00
SparcV9.td Elaborated assembly syntax of instructions in the comments. 2003-07-07 22:18:42 +00:00
SparcV9AsmPrinter.cpp Several fixes to handling of int CC register: 2003-07-10 19:42:11 +00:00
SparcV9CodeEmitter.cpp
SparcV9CodeEmitter.h
SparcV9Instr.def
SparcV9InstrInfo.cpp Bug fix in creating constants: need 1U << 31, not 1 << 31. 2003-07-10 19:48:19 +00:00
SparcV9InstrSelection.cpp Several important bug fixes: 2003-07-10 20:07:54 +00:00
SparcV9InstrSelectionSupport.h
SparcV9Internals.h
SparcV9PeepholeOpts.cpp
SparcV9PreSelection.cpp
SparcV9PrologEpilogInserter.cpp
SparcV9RegClassInfo.cpp Several fixes to handling of int CC register: 2003-07-10 19:42:11 +00:00
SparcV9RegClassInfo.h
SparcV9RegInfo.cpp Several fixes to handling of int CC register: 2003-07-10 19:42:11 +00:00
SparcV9SchedInfo.cpp
SparcV9StackSlots.cpp
SparcV9TargetMachine.cpp