+2000-12-18 David Edelsohn <edelsohn@gnu.org>
+
+ * rs6000.c (and64_operand): Use logical_u_operand.
+ (first_reg_to_save): Don't save fixed or call-used registers
+ except PIC_OFFSET_TABLE_REGNUM when -fpic even though it is fixed.
+ * rs6000.md (anddi3): Prefer rldic? over andis instruction.
+
2000-12-18 Zack Weinberg <zackw@Stanford.EDU>:
* Makefile.in: Rename cpp to cpp0, tradcpp to tradcpp0, and
if (fixed_regs[68]) /* CR0 not available, don't do andi./andis. */
return (gpc_reg_operand (op, mode) || mask64_operand (op, mode));
- return (logical_operand (op, mode) || mask64_operand (op, mode));
+ return (logical_u_operand (op, mode) || mask64_operand (op, mode));
}
/* Return 1 if the operand is either a non-special register or a
/* Find lowest numbered live register. */
for (first_reg = 13; first_reg <= 31; first_reg++)
- if (regs_ever_live[first_reg])
+ if (regs_ever_live[first_reg]
+ && (! call_used_regs[first_reg]
+ || (first_reg == PIC_OFFSET_TABLE_REGNUM
+ && (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
+ && flag_pic == 1)))
break;
if (profile_flag)
(define_insn "*anddi3_internal2"
[(set (match_operand:CC 0 "cc_reg_operand" "=x,x,x,x")
(compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r")
- (match_operand:DI 2 "and64_operand" "r,K,J,S"))
+ (match_operand:DI 2 "and64_operand" "r,S,K,J"))
(const_int 0)))
(clobber (match_scratch:DI 3 "=r,r,r,r"))]
"TARGET_POWERPC64"
"@
and. %3,%1,%2
+ rldic%B2. %3,%1,0,%S2
andi. %3,%1,%b2
- andis. %3,%1,%u2
- rldic%B2. %3,%1,0,%S2"
- [(set_attr "type" "compare,compare,compare,delayed_compare")])
+ andis. %3,%1,%u2"
+ [(set_attr "type" "compare,delayed_compare,compare,compare")])
(define_insn "*anddi3_internal3"
[(set (match_operand:CC 3 "cc_reg_operand" "=x,x,x,x")
(compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r")
- (match_operand:DI 2 "and64_operand" "r,K,J,S"))
+ (match_operand:DI 2 "and64_operand" "r,S,K,J"))
(const_int 0)))
(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r")
(and:DI (match_dup 1) (match_dup 2)))]
"TARGET_POWERPC64"
"@
and. %0,%1,%2
+ rldic%B2. %0,%1,0,%S2
andi. %0,%1,%b2
- andis. %0,%1,%u2
- rldic%B2. %0,%1,0,%S2"
- [(set_attr "type" "compare,compare,compare,delayed_compare")])
+ andis. %0,%1,%u2"
+ [(set_attr "type" "compare,delayed_compare,compare,compare")])
(define_expand "iordi3"
[(set (match_operand:DI 0 "gpc_reg_operand" "")
[(set (match_dup 0)
(match_dup 2))
(set (match_dup 0)
- (zero_extend:DI (subreg:SI (match_dup 0) 0)))]
+ (zero_extend:DI (match_dup 3)))]
"
-{ operands[2] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); }")
+{
+ operands[2] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
+ operands[3] = gen_lowpart_common (SImode, operands[0]);
+}")
(define_split
[(set (match_operand:DI 0 "gpc_reg_operand" "")