summaryrefslogtreecommitdiff
path: root/gcc/config/avr
diff options
context:
space:
mode:
authordenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-17 10:38:37 +0000
committerdenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-17 10:38:37 +0000
commit3b35173478a05bf2c31a627803eb3ebb82ae642f (patch)
tree90370fef4c9fa07ec552d6545a5cc39fd49373d0 /gcc/config/avr
parentdbf5e16009d3ebcc6cccf20ab023d041f1cd9dd6 (diff)
downloadgcc-3b35173478a05bf2c31a627803eb3ebb82ae642f.tar.gz
* config/avr/avr.c (out_set_stack_ptr): Update comment.
(print_operand): Add support for %~ and %o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38326 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/avr')
-rw-r--r--gcc/config/avr/avr.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 3de044030f1..2903509f904 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -505,8 +505,8 @@ out_set_stack_ptr (file, before, after)
}
/* Set/restore the I flag now - interrupts will be really enabled only
- after the next instruction starts. This was not clearly documented.
- XXX - verify this on the new devices with enhanced AVR core. */
+ after the next instruction. This is not clearly documented, but
+ believed to be true for all AVR devices. */
if (do_save)
{
fprintf (file, AS2 (out, __SREG__, __tmp_reg__) CR_TAB);
@@ -1003,10 +1003,15 @@ print_operand (file, x, code)
if (code >= 'A' && code <= 'D')
abcd = code - 'A';
- if (REG_P (x))
+ if (code == '~')
+ {
+ if (!AVR_MEGA)
+ fputc ('r', file);
+ }
+ else if (REG_P (x))
{
if (x == zero_reg_rtx)
- fprintf (file,"__zero_reg__");
+ fprintf (file, "__zero_reg__");
else
fprintf (file, reg_names[true_regnum (x) + abcd]);
}
@@ -1022,6 +1027,13 @@ print_operand (file, x, code)
output_address (addr);
fprintf (file, ")+%d", abcd);
}
+ else if (code == 'o')
+ {
+ if (GET_CODE (addr) != PLUS)
+ fatal_insn ("Bad address, not (reg+disp):", addr);
+
+ print_operand (file, XEXP (addr, 1), 0);
+ }
else if (GET_CODE (addr) == PLUS)
{
print_operand_address (file, XEXP (addr,0));