#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "rtl.h"
#include "tm_p.h"
#include "insn-config.h"
while (chain)
{
unsigned int regno = ORIGINAL_REGNO (*chain->loc);
+ struct reg_attrs * attr = REG_ATTRS (*chain->loc);
+
*chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg);
if (regno >= FIRST_PSEUDO_REGISTER)
ORIGINAL_REGNO (*chain->loc) = regno;
+ REG_ATTRS (*chain->loc) = attr;
chain = chain->next_use;
}
}
}
}
-/* Build def/use chain */
+/* Build def/use chain. */
static struct du_chain *
build_def_use (bb)
return;
/* Do not propagate copies to the stack pointer, as that can leave
- memory accesses with no scheduling dependancy on the stack update. */
+ memory accesses with no scheduling dependency on the stack update. */
if (dr == STACK_POINTER_REGNUM)
return;
if (vd->e[sr].mode == VOIDmode)
set_value_regno (sr, vd->e[dr].mode, vd);
- /* If we are narrowing the the input to a smaller number of hard regs,
+ /* If we are narrowing the input to a smaller number of hard regs,
and it is in big endian, we are really extracting a high part.
Since we generally associate a low part of a value with the value itself,
we must not do the same for the high part.
if (GET_MODE_SIZE (orig_mode) < GET_MODE_SIZE (new_mode))
return false;
-#ifdef CLASS_CANNOT_CHANGE_MODE
- if (TEST_HARD_REG_BIT (reg_class_contents[CLASS_CANNOT_CHANGE_MODE], regno)
- && CLASS_CANNOT_CHANGE_MODE_P (orig_mode, new_mode))
- return false;
+#ifdef CANNOT_CHANGE_MODE_CLASS
+ return !REG_CANNOT_CHANGE_MODE_P (regno, orig_mode, new_mode);
#endif
return true;
static rtx
maybe_mode_change (orig_mode, copy_mode, new_mode, regno, copy_regno)
enum machine_mode orig_mode, copy_mode, new_mode;
- unsigned int regno, copy_regno;
+ unsigned int regno, copy_regno ATTRIBUTE_UNUSED;
{
if (orig_mode == new_mode)
return gen_rtx_raw_REG (new_mode, regno);
regno)))
{
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
+ REG_ATTRS (new) = REG_ATTRS (reg);
return new;
}
}
if (validate_change (insn, &SET_SRC (set), new, 0))
{
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src);
+ REG_ATTRS (new) = REG_ATTRS (src);
if (rtl_dump_file)
fprintf (rtl_dump_file,
"insn %u: replaced reg %u with %u\n",