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]

Re: [Installed] Patch to handling of floats in sh constant pools


I've installed the attached patch to remove the bogus DImode
alignment and make the DFmode alignment be dependent on the
proper conditions.  regression tested on sh64-elf.	
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
Fri Dec  6 19:36:24 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.c (dump_table): DImode pool constants need only 32 bit alignment.
	DFmode alignment depends on TARGET_FMOVD && TARGET_ALIGN_DOUBLE.

Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.183
diff -p -r1.183 sh.c
*** config/sh/sh.c	19 Nov 2002 18:27:00 -0000	1.183
--- config/sh/sh.c	6 Dec 2002 19:40:04 -0000
*************** dump_table (scan)
*** 2354,2360 ****
    int i;
    int need_align = 1;
    rtx lab, ref;
!   int have_di = 0;
  
    /* Do two passes, first time dump out the HI sized constants.  */
  
--- 2354,2360 ----
    int i;
    int need_align = 1;
    rtx lab, ref;
!   int have_df = 0;
  
    /* Do two passes, first time dump out the HI sized constants.  */
  
*************** dump_table (scan)
*** 2379,2391 ****
  	      scan = emit_insn_after (gen_consttable_window_end (lab), scan);
  	    }
  	}
!       else if (p->mode == DImode || p->mode == DFmode)
! 	have_di = 1;
      }
  
    need_align = 1;
  
!   if (TARGET_SHCOMPACT && have_di)
      {
        rtx align_insn = NULL_RTX;
  
--- 2379,2391 ----
  	      scan = emit_insn_after (gen_consttable_window_end (lab), scan);
  	    }
  	}
!       else if (p->mode == DFmode)
! 	have_df = 1;
      }
  
    need_align = 1;
  
!   if (TARGET_FMOVD && TARGET_ALIGN_DOUBLE && have_df)
      {
        rtx align_insn = NULL_RTX;
  
*************** dump_table (scan)
*** 2429,2441 ****
  		}
  	      break;
  	    case DFmode:
- 	    case DImode:
  	      if (need_align)
  		{
  		  scan = emit_insn_after (gen_align_log (GEN_INT (3)), scan);
  		  align_insn = scan;
  		  need_align = 0;
  		}
  	      for (lab = p->label; lab; lab = LABEL_REFS (lab))
  		scan = emit_label_after (lab, scan);
  	      scan = emit_insn_after (gen_consttable_8 (p->value, const0_rtx),
--- 2429,2441 ----
  		}
  	      break;
  	    case DFmode:
  	      if (need_align)
  		{
  		  scan = emit_insn_after (gen_align_log (GEN_INT (3)), scan);
  		  align_insn = scan;
  		  need_align = 0;
  		}
+ 	    case DImode:
  	      for (lab = p->label; lab; lab = LABEL_REFS (lab))
  		scan = emit_label_after (lab, scan);
  	      scan = emit_insn_after (gen_consttable_8 (p->value, const0_rtx),

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