return m68k_unwrap_symbol_1 (orig, unwrap_reloc32_p, NULL);
}
-/* Prescan insn before outputing assembler for it. */
+/* Adjust decorated address operand before outputing assembler for it. */
-void
-m68k_final_prescan_insn (rtx_insn *insn ATTRIBUTE_UNUSED,
- rtx *operands, int n_operands)
+static void
+m68k_adjust_decorated_operand (rtx op)
{
int i;
to patch up anything outside of the operand. */
subrtx_var_iterator::array_type array;
- for (i = 0; i < n_operands; ++i)
+ FOR_EACH_SUBRTX_VAR (iter, array, op, ALL)
{
- rtx op;
-
- op = operands[i];
-
- FOR_EACH_SUBRTX_VAR (iter, array, op, ALL)
+ rtx x = *iter;
+ if (m68k_unwrap_symbol (x, true) != x)
{
- rtx x = *iter;
- if (m68k_unwrap_symbol (x, true) != x)
- {
- rtx plus;
+ rtx plus;
- gcc_assert (GET_CODE (x) == CONST);
- plus = XEXP (x, 0);
+ gcc_assert (GET_CODE (x) == CONST);
+ plus = XEXP (x, 0);
- if (GET_CODE (plus) == PLUS || GET_CODE (plus) == MINUS)
- {
- rtx unspec;
- rtx addend;
+ if (GET_CODE (plus) == PLUS || GET_CODE (plus) == MINUS)
+ {
+ rtx unspec;
+ rtx addend;
- unspec = XEXP (plus, 0);
- gcc_assert (GET_CODE (unspec) == UNSPEC);
- addend = XEXP (plus, 1);
- gcc_assert (CONST_INT_P (addend));
+ unspec = XEXP (plus, 0);
+ gcc_assert (GET_CODE (unspec) == UNSPEC);
+ addend = XEXP (plus, 1);
+ gcc_assert (CONST_INT_P (addend));
- /* We now have all the pieces, rearrange them. */
+ /* We now have all the pieces, rearrange them. */
- /* Move symbol to plus. */
- XEXP (plus, 0) = XVECEXP (unspec, 0, 0);
+ /* Move symbol to plus. */
+ XEXP (plus, 0) = XVECEXP (unspec, 0, 0);
- /* Move plus inside unspec. */
- XVECEXP (unspec, 0, 0) = plus;
+ /* Move plus inside unspec. */
+ XVECEXP (unspec, 0, 0) = plus;
- /* Move unspec to top level of const. */
- XEXP (x, 0) = unspec;
- }
- iter.skip_subrtxes ();
+ /* Move unspec to top level of const. */
+ XEXP (x, 0) = unspec;
}
+ iter.skip_subrtxes ();
}
}
}
/* Normal case: do the two words, low-numbered first. */
- m68k_final_prescan_insn (NULL, operands, 2);
handle_movsi (operands);
/* Do the middle one of the three words for long double */
if (addreg1)
handle_reg_adjust (addreg1, 4);
- m68k_final_prescan_insn (NULL, middlehalf, 2);
handle_movsi (middlehalf);
}
handle_reg_adjust (addreg1, 4);
/* Do that word. */
- m68k_final_prescan_insn (NULL, latehalf, 2);
handle_movsi (latehalf);
/* Undo the adds we just did. */
void
print_operand (FILE *file, rtx op, int letter)
{
+ if (op != NULL_RTX)
+ m68k_adjust_decorated_operand (op);
+
if (letter == '.')
{
if (MOTOROLA)
{
struct m68k_address address;
+ m68k_adjust_decorated_operand (addr);
+
if (!m68k_decompose_address (QImode, addr, true, &address))
gcc_unreachable ();