aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGunther Nikl <gnikl@users.sourceforge.net>2010-06-17 19:54:16 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-06-17 19:54:16 +0000
commitd398d9033ab546ac985784ed07051b3f22126d91 (patch)
tree431ecbdcb290a0b7c2bb3b9947af3371e0325543 /gcc
parent654bbfea483dbbcb0ce8556cdb532f6570756912 (diff)
downloadgcc-d398d9033ab546ac985784ed07051b3f22126d91.zip
gcc-d398d9033ab546ac985784ed07051b3f22126d91.tar.gz
gcc-d398d9033ab546ac985784ed07051b3f22126d91.tar.bz2
rs6000.c (print_operand): Also use print_operand_address and puts to output the operand for CONST.
* config/rs6000/rs6000.c (print_operand) <'K'>: Also use print_operand_address and puts to output the operand for CONST. From-SVN: r160945
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c17
2 files changed, 8 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 31a6b91..f68d673 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-17 Gunther Nikl <gnikl@users.sourceforge.net>
+
+ * config/rs6000/rs6000.c (print_operand) <'K'>: Also use
+ print_operand_address and puts to output the operand for CONST.
+
2010-06-17 Jakub Jelinek <jakub@redhat.com>
PR debug/44572
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 863e7fa..55dd0a6 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -14885,27 +14885,16 @@ print_operand (FILE *file, rtx x, int code)
/* X must be a symbolic constant on ELF. Write an
expression suitable for an 'addi' that adds in the low 16
bits of the MEM. */
- if (GET_CODE (x) != CONST)
- {
- print_operand_address (file, x);
- fputs ("@l", file);
- }
- else
+ if (GET_CODE (x) == CONST)
{
if (GET_CODE (XEXP (x, 0)) != PLUS
|| (GET_CODE (XEXP (XEXP (x, 0), 0)) != SYMBOL_REF
&& GET_CODE (XEXP (XEXP (x, 0), 0)) != LABEL_REF)
|| GET_CODE (XEXP (XEXP (x, 0), 1)) != CONST_INT)
output_operand_lossage ("invalid %%K value");
- print_operand_address (file, XEXP (XEXP (x, 0), 0));
- fputs ("@l", file);
- /* For GNU as, there must be a non-alphanumeric character
- between 'l' and the number. The '-' is added by
- print_operand() already. */
- if (INTVAL (XEXP (XEXP (x, 0), 1)) >= 0)
- fputs ("+", file);
- print_operand (file, XEXP (XEXP (x, 0), 1), 0);
}
+ print_operand_address (file, x);
+ fputs ("@l", file);
return;
/* %l is output_asm_label. */