From a02ac96696de10ffaf30cfdfac8a54b599368a2d Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 11 Feb 2002 22:38:30 +0000 Subject: [PATCH] mmix.c (mmix_assemble_integer): Handle non-CONST_INT through default_assemble_integer. * config/mmix/mmix.c (mmix_assemble_integer) : Handle non-CONST_INT through default_assemble_integer. : Likewise, for non-CONST_INT, non-SYMBOL_REF. : Abort for CONST_DOUBLE. From-SVN: r49687 --- gcc/ChangeLog | 7 +++++++ gcc/config/mmix/mmix.c | 32 +++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7608058f1bf..524c6d09495 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-02-11 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_assemble_integer) : Handle + non-CONST_INT through default_assemble_integer. + : Likewise, for non-CONST_INT, non-SYMBOL_REF. + : Abort for CONST_DOUBLE. + 2002-02-11 John David Anglin * gcc.c (init_gcc_specs): Add static libgcc to link when "-shared" diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 8192d9b6a66..50ab71b2b2f 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -1909,19 +1909,43 @@ mmix_assemble_integer (x, size, aligned_p) if (aligned_p) switch (size) { + /* We handle a limited number of types of operands in here. But + that's ok, because we can punt to generic functions. We then + pretend that we don't emit aligned data is needed, so the usual + .pseudo syntax is used (which work for aligned data too). We + actually *must* do that, since we say we don't have simple + aligned pseudos, causing this function to be called. We just + try and keep as much compatibility as possible with mmixal + syntax for normal cases (i.e. without GNU extensions and C + only). */ case 1: + if (GET_CODE (x) != CONST_INT) + { + aligned_p = 0; + break; + } fputs ("\tBYTE\t", asm_out_file); mmix_print_operand (asm_out_file, x, 'B'); fputc ('\n', asm_out_file); return true; case 2: + if (GET_CODE (x) != CONST_INT) + { + aligned_p = 0; + break; + } fputs ("\tWYDE\t", asm_out_file); mmix_print_operand (asm_out_file, x, 'W'); fputc ('\n', asm_out_file); return true; case 4: + if (GET_CODE (x) != CONST_INT && GET_CODE (x) != SYMBOL_REF) + { + aligned_p = 0; + break; + } fputs ("\tTETRA\t", asm_out_file); mmix_print_operand (asm_out_file, x, 'L'); fputc ('\n', asm_out_file); @@ -1929,9 +1953,11 @@ mmix_assemble_integer (x, size, aligned_p) case 8: if (GET_CODE (x) == CONST_DOUBLE) - mmix_output_octa (asm_out_file, mmix_intval (x), 0); - else - assemble_integer_with_op ("\tOCTA\t", x); + /* We don't get here anymore for CONST_DOUBLE, because DImode + isn't expressed as CONST_DOUBLE, and DFmode is handled + elsewhere. */ + abort (); + assemble_integer_with_op ("\tOCTA\t", x); return true; } return default_assemble_integer (x, size, aligned_p); -- 2.30.2