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]

IA64 HP-UX ILP32 patch


This patch fixes two compile testsuite failures for HP-UX in ILP32 mode,
gcc.c-torture/compile/20020129-1.c and gcc.c-torture/compile/930623-1.c.
It forces a function address to DImode before using it.  Since this is
done in ia64_expand_call before it calls gen_call_gp I also modified
call_gp in ia64.md to only recoginize DImode, this in turn gets rid of a
warning that genrecog was producing during the build and caused no
regressions in the test run.

Ok to check in on the main line?

Steve Ellcey
sje@cup.hp.com


2003-10-09  Steve Ellcey  <sje@cup.hp.com>

	* config/ia64/ia64.c (ia64_expand_call): Force function address
	to DImode.
	* config/ia64/ia64.md (call_gp): Put DImode on operand 0.


*** gcc.orig/gcc/gcc/config/ia64/ia64.c	Wed Oct  8 13:01:42 2003
--- gcc/gcc/gcc/config/ia64/ia64.c	Thu Oct  9 14:46:00 2003
*************** ia64_expand_call (rtx retval, rtx addr, 
*** 1496,1501 ****
--- 1496,1505 ----
    rtx insn, b0;
  
    addr = XEXP (addr, 0);
+ #ifdef POINTERS_EXTEND_UNSIGNED
+   if (GET_MODE(addr) != DImode)
+     addr = convert_memory_address (DImode, addr);
+ #endif
    b0 = gen_rtx_REG (DImode, R_BR (0));
  
    /* ??? Should do this for functions known to bind local too.  */
*** gcc.orig/gcc/gcc/config/ia64/ia64.md	Wed Oct  8 13:01:45 2003
--- gcc/gcc/gcc/config/ia64/ia64.md	Thu Oct  9 14:46:15 2003
***************
*** 4731,4737 ****
    [(set_attr "itanium_class" "br,scall")])
  
  (define_insn "call_gp"
!   [(call (mem:DI (match_operand 0 "call_operand" "?r,i"))
  	 (const_int 1))
     (clobber (match_operand:DI 1 "register_operand" "=b,b"))
     (clobber (match_scratch:DI 2 "=&r,X"))
--- 4731,4737 ----
    [(set_attr "itanium_class" "br,scall")])
  
  (define_insn "call_gp"
!   [(call (mem:DI (match_operand:DI 0 "call_operand" "?r,i"))
  	 (const_int 1))
     (clobber (match_operand:DI 1 "register_operand" "=b,b"))
     (clobber (match_scratch:DI 2 "=&r,X"))


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