summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-03-23 21:22:17 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-03-23 21:22:17 +0000
commitda2a2aad018c6081653637ab538630c169b9639a (patch)
tree8a135e1fbcbd8ba8745e09085293b11e53818254 /gcc
parent883552984ccede4e1e2c83444070e22c00504a6c (diff)
downloadgcc-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')
-rw-r--r--gcc/config/ns32k/ns32k.c65
-rw-r--r--gcc/config/ns32k/pc532.h6
2 files changed, 54 insertions, 17 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);
diff --git a/gcc/config/ns32k/pc532.h b/gcc/config/ns32k/pc532.h
index 22cb3c900d6..89e0980b4e1 100644
--- a/gcc/config/ns32k/pc532.h
+++ b/gcc/config/ns32k/pc532.h
@@ -57,7 +57,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define CPP_PREDEFINES "-Dns32000 -Dns32532 -Dpc532 -Dunix"
/* Use pc relative addressing whenever possible,
- it's more efficient than absolute (out-ns32k.c)
+ it's more efficient than absolute (ns32k.c)
You have to fix a bug in gas 1.38.1 to make this work with gas,
patch available from jkp@cs.hut.fi. */
@@ -66,3 +66,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This machine appears to use GAS syntax. */
#define GAS_SYNTAX
+
+/* Every address needs to use a base reg. */
+
+#define BASE_REG_NEEDED