llvm-6502/lib/Target
Nate Begeman bdf69847a9 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16832 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 02:49:24 +00:00
..
CBackend Really fix FreeBSD, which apparently doesn't tolerate the extern. 2004-10-06 04:21:52 +00:00
PowerPC Implement logical and with an immediate that consists of a contiguous block 2004-10-08 02:49:24 +00:00
Skeleton Make sure to set the operand list 2004-09-21 17:30:54 +00:00
Sparc I think this will handle double args. 2004-09-30 19:44:32 +00:00
SparcV8 I think this will handle double args. 2004-09-30 19:44:32 +00:00
SparcV9 Make EmitMappingInfo into an "external location" option, so that it can be set 2004-09-30 20:20:01 +00:00
X86 Remove debugging code, fix encoding problem. This fixes the problems 2004-10-06 14:31:50 +00:00
Makefile Targets are independent of each other, so compile them in parallel 2004-09-15 01:34:25 +00:00
MRegisterInfo.cpp Add getAllocatableSet() function. 2004-08-26 22:21:04 +00:00
Target.td Add initial support for variants 2004-10-03 19:34:18 +00:00
TargetData.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
TargetFrameInfo.cpp Remove dead methods 2004-08-12 18:37:15 +00:00
TargetInstrInfo.cpp ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, its 2004-07-27 21:43:38 +00:00
TargetMachine.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
TargetMachineRegistry.cpp Implement TargetRegistrationListener 2004-07-11 06:03:21 +00:00
TargetSchedInfo.cpp Since we use alloca now make sure we include the proper headers for it. 2004-09-28 02:53:15 +00:00