From a653b93fbd262fcb9394aa4a291424ffefcfab57 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Makarov" Date: Mon, 1 Mar 1999 08:53:02 +0000 Subject: [PATCH] h8300.c (print_operand): Use 16 bit addressing when the data in 8-bit area and can not be addressed by 8-bit. Mon Mar 1 11:46:25 1999 Vladimir N. Makarov * config/h8300/h8300.c (print_operand): Use 16 bit addressing when the data in 8-bit area and can not be addressed by 8-bit. From-SVN: r25513 --- gcc/ChangeLog | 5 +++++ gcc/config/h8300/h8300.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 139e73445ac..bdcf394ac73 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 1 11:46:25 1999 Vladimir N. Makarov + + * config/h8300/h8300.c (print_operand): Use 16 bit addressing + when the data in 8-bit area and can not be addressed by 8-bit. + Sun Feb 28 16:40:00 1999 Richard Henderson * flow.c (create_basic_block): Disregard integrated bb notes. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 4dc48958268..fac3cbf1acc 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1414,13 +1414,14 @@ print_operand (file, x, code) 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". */ - if (code == 'R' - && GET_CODE (XEXP (x, 0)) == SYMBOL_REF + /* 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, ":8"); - if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF + 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"); break; -- 2.30.2