diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-11 04:26:58 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-11 04:26:58 +0000 |
commit | b99f3ebb2594296675620ed789ec77580b823b1e (patch) | |
tree | b0e5b98a7584e1f39446947bdb221a410aaa2ccd | |
parent | 7198848c91027239b0c2baf4691304999f0ccc61 (diff) | |
download | gcc-b99f3ebb2594296675620ed789ec77580b823b1e.tar.gz |
* config/h8300/h8300.c (print_operand): Remove redundant code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49666 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.c | 36 |
2 files changed, 24 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a35f407166..c70f1dfbc9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2002-02-10 Kazu Hirata <kazu@hxi.com> + * config/h8300/h8300.c (print_operand): Remove redundant code. + +2002-02-10 Kazu Hirata <kazu@hxi.com> + * config/h8300/h8300-protos.h: Remove the prototype for byte_reg. * config/h8300/h8300.c (byte_reg): Make it static. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 778de62068b..6a47d0a5a05 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1213,22 +1213,26 @@ print_operand (file, x, code) break; case MEM: - fprintf (file, "@"); - output_address (XEXP (x, 0)); - - /* If this is an 'R' operand (reference into the 8-bit - area), then specify a symbolic address as "foo:8", - otherwise if operand is still in eight bit section, use - "foo:16". */ - if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF - && SYMBOL_REF_FLAG (XEXP (x, 0))) - fprintf (file, (code == 'R' ? ":8" : ":16")); - else if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF - && TINY_DATA_NAME_P (XSTR (XEXP (x, 0), 0))) - fprintf (file, ":16"); - else if ((code == 'R') - && EIGHTBIT_CONSTANT_ADDRESS_P (XEXP (x, 0))) - fprintf (file, ":8"); + { + rtx addr = XEXP (x, 0); + + fprintf (file, "@"); + output_address (addr); + + /* If this is an 'R' operand (reference into the 8-bit + area), then specify a symbolic address as "foo:8", + otherwise if operand is still in eight bit section, use + "foo:16". */ + if (GET_CODE (addr) == SYMBOL_REF + && SYMBOL_REF_FLAG (addr)) + fprintf (file, (code == 'R' ? ":8" : ":16")); + else if (GET_CODE (addr) == SYMBOL_REF + && TINY_DATA_NAME_P (XSTR (addr, 0))) + fprintf (file, ":16"); + else if ((code == 'R') + && EIGHTBIT_CONSTANT_ADDRESS_P (addr)) + fprintf (file, ":8"); + } break; case CONST_INT: |