+2001-03-16 Michael Meissner <meissner@redhat.com>
+
+ * mips.h (BITMASK_HIGH): Replacement for 0x80000000 that avoids
+ warnings.
+ (BITMASK_UPPER16): Replacement for 0xffff0000 that avoids
+ warnings.
+ (BITMASK_LOWER16): Replacement for 0x0000ffff.
+
+ * mips.c (save_restore_insns): Use BITMASK_UPPER16/BITMASK_LOWER16
+ instead of 0xffff0000/0x0000ffff to avoid warnings about constants
+ being unsigned in ISO C and signed in traditional.
+ (expand_prologue): Ditto.
+ (RA_MASK): Use BITMASK_HIGH to avoid warnings.
+
+ * mips.md (divmodsi4,divmodsi4): Use BITMASK_HIGH to avoid
+ warnings.
+ (divsi3,divdi3): Ditto.
+ (modsi3,moddi3): Ditto.
+ (fix_truncdfsi2,fix_truncdfdi2): Ditto.
+ (fix_truncsfsi2,fix_truncsfdi2): Ditto.
+ (movsi split): Use BITMASK_UPPER16/BITMASK_LOWER16 to avoid
+ warnings.
+
Fri Mar 16 14:47:57 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_expand_fp_movcc): Do not attempt to construct
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
- GEN_INT (gp_offset & 0xffff0000));
+ GEN_INT (gp_offset & BITMASK_UPPER16));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
insn
= emit_insn (gen_iorsi3 (base_reg_rtx, base_reg_rtx,
- GEN_INT (gp_offset & 0x0000ffff)));
+ GEN_INT (gp_offset
+ & BITMASK_LOWER16)));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
}
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
- GEN_INT (fp_offset & 0xffff0000));
+ GEN_INT (fp_offset & BITMASK_UPPER16));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_insn (gen_iorsi3 (base_reg_rtx, base_reg_rtx,
- GEN_INT (fp_offset & 0x0000ffff)));
+ GEN_INT (fp_offset
+ & BITMASK_LOWER16)));
if (store_p)
RTX_FRAME_RELATED_P (insn) = 1;
}
&& GET_MODE (tmp_rtx) == SImode)
{
insn = emit_move_insn (tmp_rtx,
- GEN_INT (tsize & 0xffff0000));
+ GEN_INT (tsize & BITMASK_UPPER16));
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_insn (gen_iorsi3 (tmp_rtx, tmp_rtx,
- GEN_INT (tsize & 0x0000ffff)));
+ GEN_INT (tsize
+ & BITMASK_LOWER16)));
RTX_FRAME_RELATED_P (insn) = 1;
}
else
/* Do any necessary cleanup after a function to restore stack, frame,
and regs. */
-#define RA_MASK 0x80000000L /* 1 << 31 */
+#define RA_MASK BITMASK_HIGH /* 1 << 31 */
#define PIC_OFFSET_TABLE_MASK (1 << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST))
void
copy_to_mode_reg (SImode, GEN_INT (-1)),
GEN_INT (0x6)));
emit_insn (gen_div_trap (operands[2],
- copy_to_mode_reg (SImode, GEN_INT (0x80000000)),
+ copy_to_mode_reg (SImode, GEN_INT (BITMASK_HIGH)),
GEN_INT (0x6)));
}
copy_to_mode_reg (DImode, GEN_INT (-1)),
GEN_INT (0x6)));
emit_insn (gen_div_trap (operands[2],
- copy_to_mode_reg (DImode, GEN_INT (0x80000000)),
+ copy_to_mode_reg (DImode, GEN_INT (BITMASK_HIGH)),
GEN_INT (0x6)));
}
copy_to_mode_reg (SImode, GEN_INT (-1)),
GEN_INT (0x6)));
emit_insn (gen_div_trap (operands[2],
- copy_to_mode_reg (SImode, GEN_INT (0x80000000)),
+ copy_to_mode_reg (SImode, GEN_INT (BITMASK_HIGH)),
GEN_INT (0x6)));
}
copy_to_mode_reg (DImode, GEN_INT (-1)),
GEN_INT (0x6)));
emit_insn (gen_div_trap (operands[2],
- copy_to_mode_reg (DImode, GEN_INT (0x80000000)),
+ copy_to_mode_reg (DImode, GEN_INT (BITMASK_HIGH)),
GEN_INT (0x6)));
}
copy_to_mode_reg (SImode, GEN_INT (-1)),
GEN_INT (0x6)));
emit_insn (gen_div_trap (operands[2],
- copy_to_mode_reg (SImode, GEN_INT (0x80000000)),
+ copy_to_mode_reg (SImode, GEN_INT (BITMASK_HIGH)),
GEN_INT (0x6)));
}
copy_to_mode_reg (DImode, GEN_INT (-1)),
GEN_INT (0x6)));
emit_insn (gen_div_trap (operands[2],
- copy_to_mode_reg (DImode, GEN_INT (0x80000000)),
+ copy_to_mode_reg (DImode, GEN_INT (BITMASK_HIGH)),
GEN_INT (0x6)));
}
emit_label (label1);
emit_move_insn (reg2, gen_rtx_MINUS (DFmode, operands[1], reg1));
- emit_move_insn (reg3, GEN_INT (0x80000000));
+ emit_move_insn (reg3, GEN_INT (BITMASK_HIGH));
emit_insn (gen_fix_truncdfsi2 (operands[0], reg2));
emit_insn (gen_iorsi3 (operands[0], operands[0], reg3));
emit_label (label1);
emit_move_insn (reg2, gen_rtx_MINUS (DFmode, operands[1], reg1));
- emit_move_insn (reg3, GEN_INT (0x80000000));
+ emit_move_insn (reg3, GEN_INT (BITMASK_HIGH));
emit_insn (gen_ashldi3 (reg3, reg3, GEN_INT (32)));
emit_insn (gen_fix_truncdfdi2 (operands[0], reg2));
emit_label (label1);
emit_move_insn (reg2, gen_rtx_MINUS (SFmode, operands[1], reg1));
- emit_move_insn (reg3, GEN_INT (0x80000000));
+ emit_move_insn (reg3, GEN_INT (BITMASK_HIGH));
emit_insn (gen_fix_truncsfsi2 (operands[0], reg2));
emit_insn (gen_iorsi3 (operands[0], operands[0], reg3));
emit_label (label1);
emit_move_insn (reg2, gen_rtx_MINUS (SFmode, operands[1], reg1));
- emit_move_insn (reg3, GEN_INT (0x80000000));
+ emit_move_insn (reg3, GEN_INT (BITMASK_HIGH));
emit_insn (gen_ashldi3 (reg3, reg3, GEN_INT (32)));
emit_insn (gen_fix_truncsfdi2 (operands[0], reg2));
(match_dup 3)))]
"
{
- operands[2] = GEN_INT (INTVAL (operands[1]) & 0xffff0000);
- operands[3] = GEN_INT (INTVAL (operands[1]) & 0x0000ffff);
+ operands[2] = GEN_INT (INTVAL (operands[1]) & BITMASK_UPPER16);
+ operands[3] = GEN_INT (INTVAL (operands[1]) & BITMASK_LOWER16);
}")
;; Unlike most other insns, the move insns can't be split with