aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2002-03-23 01:28:03 +0000
committerBob Wilson <bwilson@gcc.gnu.org>2002-03-23 01:28:03 +0000
commit84bf8c2c66eafc037581dec88287221403d12258 (patch)
treeeed89c1571ffa42c879bd26f5511f80879d40455
parentacb044eef18c3171530b5499f960fa2ab7989a16 (diff)
downloadgcc-84bf8c2c66eafc037581dec88287221403d12258.zip
gcc-84bf8c2c66eafc037581dec88287221403d12258.tar.gz
gcc-84bf8c2c66eafc037581dec88287221403d12258.tar.bz2
xtensa.c (print_operand): Fix incorrect mode passed to adjust_address.
* config/xtensa/xtensa.c (print_operand): Fix incorrect mode passed to adjust_address. Fix comment formatting. From-SVN: r51215
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/xtensa/xtensa.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 287ddeb..e2a2102 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-22 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa.c (print_operand): Fix incorrect mode
+ passed to adjust_address. Fix comment formatting.
+
+
2002-03-22 Zack Weinberg <zack@codesourcery.com>
* real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE.
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index a791da0..e99d537 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1926,10 +1926,8 @@ print_operand (file, op, letter)
}
case MEM:
- /*
- * For a volatile memory reference, emit a MEMW before the
- * load or store.
- */
+ /* For a volatile memory reference, emit a MEMW before the
+ load or store. */
if (letter == 'v')
{
if (MEM_VOLATILE_P (op) && TARGET_SERIALIZE_VOLATILE)
@@ -1937,7 +1935,16 @@ print_operand (file, op, letter)
break;
}
else if (letter == 'N')
- op = adjust_address (op, GET_MODE (op), 4);
+ {
+ enum machine_mode mode;
+ switch (GET_MODE (op))
+ {
+ case DFmode: mode = SFmode; break;
+ case DImode: mode = SImode; break;
+ default: abort ();
+ }
+ op = adjust_address (op, mode, 4);
+ }
output_address (XEXP (op, 0));
break;