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]

Re: 2.95: Alpha ev6 float compare problem


> The problem is that the compare instructions are not issued with the
> su suffix.

This is a "prepatch" for the problem that seems to fix it.  Since
I haven't tried to change anything in egcs/gcc before, this is
just meant as an idea for someone else to use.

The problem is that when compiling for the EV6, the trap precision
was set to the entire program to avoid inserting trapb instructions
or worrying about trap shadows.  This didn't use the correct instructions
for compares.

I left the trap precision at instruction when compiling with -mieee,
(and more generally, left it at whatever was set by the other options)
but only inserted trap barriers for ev4 and ev5 processors.

This bootstrapped, and my code now works, but someone should
do a make check with -mieee enabled; I don't have the infrastructure
installed yet on my new alpha to do this.

PS: It would be really nice if alpha_align_insns were available
for the ev6 alpha processor.

Brad Lucier    lucier@math.purdue.edu

popov-87% rcsdiff -c alpha.c
===================================================================
RCS file: RCS/alpha.c,v
retrieving revision 1.1
diff -c -r1.1 alpha.c
*** alpha.c     1999/08/02 03:55:26     1.1
--- alpha.c     1999/08/02 04:16:35
***************
*** 230,240 ****
          alpha_cpu = PROCESSOR_EV6;
          target_flags |= MASK_BWX | MASK_MAX | MASK_FIX;
          target_flags &= ~ (MASK_CIX);
- 
-         /* Except for EV6 pass 1 (not released), we always have 
-            precise arithmetic traps.  Which means we can do 
-            software completion without minding trap shadows.  */
-         alpha_tp = ALPHA_TP_PROG;
        }
        else
        error ("bad value `%s' for -mcpu switch", alpha_cpu_string);
--- 230,235 ----
***************
*** 5041,5047 ****
  alpha_reorg (insns)
       rtx insns;
  {
!   if (alpha_tp != ALPHA_TP_PROG || flag_exceptions)
      alpha_handle_trap_shadows (insns);
  
  #ifdef HAIFA
--- 5036,5046 ----
  alpha_reorg (insns)
       rtx insns;
  {
!   /* PROCESSOR_EV4 and PROCESSOR_EV5 use trap shadows */
! 
!   if (((alpha_cpu == PROCESSOR_EV4 || alpha_cpu == PROCESSOR_EV5) && 
!        (alpha_tp != ALPHA_TP_PROG))
!        || flag_exceptions)
      alpha_handle_trap_shadows (insns);
  
  #ifdef HAIFA


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