1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/lib/Target/PowerPC
Nate Begeman dfefd2f3fc Implement logical and with an immediate that consists of a contiguous block
of one or more 1 bits (may wrap from least significant bit to most
significant bit) as the rlwinm rather than andi., andis., or some longer
instructons sequence.

int andn4(int z) { return z & -4; }
int clearhi(int z) { return z & 0x0000FFFF; }
int clearlo(int z) { return z & 0xFFFF0000; }
int clearmid(int z) { return z & 0x00FFFF00; }
int clearwrap(int z) { return z & 0xFF0000FF; }

_andn4:
        rlwinm r3, r3, 0, 0, 29
        blr

_clearhi:
        rlwinm r3, r3, 0, 16, 31
        blr

_clearlo:
        rlwinm r3, r3, 0, 0, 15
        blr

_clearmid:
        rlwinm r3, r3, 0, 8, 23
        blr

_clearwrap:
        rlwinm r3, r3, 0, 24, 7
        blr

llvm-svn: 16832
2004-10-08 02:49:24 +00:00
..
LICENSE.TXT Added Louis Gerbarg. Louis is given credit in the CREDITS.TXT file, so I 2004-08-05 23:46:27 +00:00
Makefile * Change PPC32AsmPrinter => PowerPCAsmPrinter since it is now shared between 2004-09-05 02:42:44 +00:00
PowerPC.h All PPC instructions are now auto-printed 2004-09-04 05:00:00 +00:00
PowerPC.td * Change PPC32AsmPrinter => PowerPCAsmPrinter since it is now shared between 2004-09-05 02:42:44 +00:00
PowerPCAsmPrinter.cpp add optimized code sequences for setcc x, 0 2004-09-22 04:40:25 +00:00
PowerPCBranchSelector.cpp Remove unnecessary header include 2004-10-07 22:24:32 +00:00
PowerPCFrameInfo.h LR needs to be saved at 16-byte offset on a 64-bit arch 2004-08-19 21:36:14 +00:00
PowerPCInstrBuilder.h * Wrap long lines (comments and code) 2004-07-07 20:01:36 +00:00
PowerPCInstrFormats.td All PPC instructions are now auto-printed 2004-09-04 05:00:00 +00:00
PowerPCInstrInfo.h The PowerPCInstrInfo class has gone away. 2004-08-17 05:00:46 +00:00
PowerPCInstrInfo.td Several fixes and enhancements to the PPC32 backend. 2004-10-07 22:30:03 +00:00
PowerPCJITInfo.h Breaking up the PowerPC target into 32- and 64-bit subparts, Part III: the rest. 2004-08-11 00:11:25 +00:00
PowerPCRegisterInfo.h PowerPCRegisterInfo no longer takes a bool to differentiate 32 vs 64 bits 2004-08-17 05:02:18 +00:00
PowerPCRegisterInfo.td Revamp the Register class, and allow the use of the RegisterGroup class to 2004-09-14 04:17:02 +00:00
PowerPCTargetMachine.cpp All PPC instructions are now auto-printed 2004-09-04 05:00:00 +00:00
PowerPCTargetMachine.h All PPC instructions are now auto-printed 2004-09-04 05:00:00 +00:00
PPC32.td PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC* 2004-08-17 04:55:41 +00:00
PPC32CodeEmitter.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
PPC32InstrInfo.cpp Add ori reg, reg, 0 as a move instruction. This can be generated from 2004-10-07 22:26:12 +00:00
PPC32InstrInfo.h PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC* 2004-08-17 04:55:41 +00:00
PPC32ISelSimple.cpp Implement logical and with an immediate that consists of a contiguous block 2004-10-08 02:49:24 +00:00
PPC32JITInfo.h Clean up 32/64bit and Darwin/AIX split. Next steps: 64 bit ISel, AIX asm printer. 2004-08-11 07:40:04 +00:00
PPC32RegisterInfo.cpp Correct some BuildMI arguments for the upcoming simple scheduler 2004-09-27 05:08:17 +00:00
PPC32RegisterInfo.h PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC* 2004-08-17 04:55:41 +00:00
PPC32RegisterInfo.td Switch from bytes to bits for alignment. 2004-08-21 20:14:40 +00:00
PPC32TargetMachine.h All PPC instructions are now auto-printed 2004-09-04 05:00:00 +00:00
PPC64.td Use the appropriate 64-bit register description file. 2004-08-19 19:36:57 +00:00
PPC64CodeEmitter.cpp Breaking up the PowerPC target into 32- and 64-bit subparts: Part II: 64-bit. 2004-08-11 00:10:41 +00:00
PPC64InstrInfo.cpp PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC 2004-08-17 04:57:37 +00:00
PPC64InstrInfo.h PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC 2004-08-17 04:57:37 +00:00
PPC64ISelSimple.cpp Several fixes and enhancements to the PPC32 backend. 2004-10-07 22:30:03 +00:00
PPC64JITInfo.h Clean up 32/64bit and Darwin/AIX split. Next steps: 64 bit ISel, AIX asm printer. 2004-08-11 07:40:04 +00:00
PPC64RegisterInfo.cpp Correct some BuildMI arguments for the upcoming simple scheduler 2004-09-27 05:08:17 +00:00
PPC64RegisterInfo.h PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC 2004-08-17 04:57:37 +00:00
PPC64RegisterInfo.td Switch from bytes to bits for alignment. 2004-08-21 20:14:40 +00:00
PPC64TargetMachine.h PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC 2004-08-17 04:57:37 +00:00
README.txt All PPC instructions are now auto-printed 2004-09-04 05:00:00 +00:00

TODO:
* implement not-R0 register GPR class
* fix rlwimi generation to be use-and-def
* implement scheduling info
* implement powerpc-64 for darwin
* implement powerpc-64 for aix
* use stfiwx in float->int
* should hint to the branch select pass that it doesn't need to print the
  second unconditional branch, so we don't end up with things like:
	b .LBBl42__2E_expand_function_8_674	; loopentry.24
	b .LBBl42__2E_expand_function_8_42	; NewDefault
	b .LBBl42__2E_expand_function_8_42	; NewDefault

Currently failing tests that should pass:
* MultiSource
  |- Applications
  |  `- hbd: miscompilation