This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed, MMIX: Fix gcc.c-torture/compile/labels-3.c


This fixes gcc.c-torture/compile/labels-3.c.  For that test,
there's an incoming (minus:HI (subreg:HI (label_ref:DI 0) 6)
(subreg:HI (label_ref:DI 0) 6)), not the usual CONST_INT.  I
also spotted a typo; that mmix_output_octa call should have 1 as
its last parameter to get a mnemonic output.  Apparently it's
not called anymore, and thinking about it, there's no reason it
would be called.  Better put a prominent watch on it with an
abort ().

	* config/mmix/mmix.c (mmix_assemble_integer) <case 1, 2>: Handle
	non-CONST_INT through default_assemble_integer.
	<case 4>: Likewise, for non-CONST_INT, non-SYMBOL_REF.
	<case 8>: Abort for CONST_DOUBLE.

Index: mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.16
diff -p -c -r1.16 mmix.c
*** mmix.c	2002/02/06 05:13:12	1.16
--- mmix.c	2002/02/11 22:20:18
*************** mmix_assemble_integer (x, size, aligned_
*** 1909,1927 ****
--- 1909,1951 ----
    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);
*************** mmix_assemble_integer (x, size, aligned_
*** 1929,1937 ****

        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);
  	return true;
        }
    return default_assemble_integer (x, size, aligned_p);
--- 1953,1963 ----

        case 8:
  	if (GET_CODE (x) == CONST_DOUBLE)
! 	  /* 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);

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]