diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-03-23 21:22:17 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-03-23 21:22:17 +0000 |
commit | da2a2aad018c6081653637ab538630c169b9639a (patch) | |
tree | 8a135e1fbcbd8ba8745e09085293b11e53818254 /gcc/config/ns32k/ns32k.c | |
parent | 883552984ccede4e1e2c83444070e22c00504a6c (diff) | |
download | gcc-da2a2aad018c6081653637ab538630c169b9639a.tar.gz |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@580 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ns32k/ns32k.c')
-rw-r--r-- | gcc/config/ns32k/ns32k.c | 65 |
1 files changed, 49 insertions, 16 deletions
diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c index 6e0cb993215..c04b8b86b21 100644 --- a/gcc/config/ns32k/ns32k.c +++ b/gcc/config/ns32k/ns32k.c @@ -211,7 +211,7 @@ secondary_reload_class (class, mode, in) /* Generate the rtx that comes from an address expression in the md file */ /* The expression to be build is BASE[INDEX:SCALE]. To recognize this, scale must be converted from an exponent (from ASHIFT) to a - muliplier (for MULT). */ + multiplier (for MULT). */ rtx gen_indexed_expr (base, index, scale) rtx base, index, scale; @@ -380,22 +380,55 @@ print_operand (file, x, code) else if (GET_CODE (x) == REG) fprintf (file, "%s", reg_names[REGNO (x)]); else if (GET_CODE (x) == MEM) - output_address (XEXP (x, 0)); + { + rtx tmp = XEXP (x, 0); +#ifndef PC_RELATIVE + if (GET_CODE (tmp) == SYMBOL_REF || GET_CODE (tmp) == LABEL_REF) + { + char *out = XSTR (tmp, 0); + if (out[0] == '*') + fprintf (file, "@%s", &out[1]); + else + ASM_OUTPUT_LABELREF (file, out); + } + else +#endif + output_address (XEXP (x, 0)); + } else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != DImode) - if (GET_MODE (x) == DFmode) - { - union { double d; int i[2]; } u; - u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); - PUT_IMMEDIATE_PREFIX(file); - fprintf (file, "0d%.20e", u.d); - } - else - { - union { double d; int i[2]; } u; - u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); - PUT_IMMEDIATE_PREFIX(file); - fprintf (file, "0f%.20e", u.d); - } + { + if (GET_MODE (x) == DFmode) + { + union { double d; int i[2]; } u; + u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); + PUT_IMMEDIATE_PREFIX(file); +#ifdef SEQUENT_ASM + /* Sequent likes it's floating point constants as integers */ + fprintf (file, "0Dx%08x%08x", u.i[1], u.i[0])l +#else +#ifdef ENCORE_ASM + fprintf (file, "0f%.20e", u.d); +#else + fprintf (file, "0d%.20e", u.d); +#endif +#endif + } + else + { + union { double d; int i[2]; } u; + u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); + PUT_IMMEDIATE_PREFIX(file); +#ifdef SEQUENT_ASM + { + union { float f; long l; } uu; + uu.f = u.d; + fprintf (file, "0Fx%08x", uu.l); + } +#else + fprintf (file, "0f%.20e", u.d); +#endif + } + } else { PUT_IMMEDIATE_PREFIX(file); |