Patch for HP-UX IA64 structure passing

Jessica Han jessica@cup.hp.com
Fri Jun 21 15:52:00 GMT 2002


This patch fixes a bug in pass small structures on HPUX IA64. 
The bug is discovered by gcc.c-torture/execute/930713-01.c at -O2.  
2002-06-21 Jessica Han <jessica@cup.hp.com>
	* gcc/expmed.c (extract_bit_field) No need to convert bitpos when the  
        argument is passed in little-endian manner.
*** expmed.c.1.121	Thu Jun 20 13:23:19 2002
--- expmed.c	Thu Jun 20 13:47:34 2002
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1094,1099 ****
--- 1094,1100 ----
       But as we have it, it counts within whatever size OP0 now has.
       On a bigendian machine, these are not the same, so convert.  */
    if (BYTES_BIG_ENDIAN
+       && !FUNCTION_ARG_REG_LITTLE_ENDIAN
        && GET_CODE (op0) != MEM
        && unit > GET_MODE_BITSIZE (GET_MODE (op0)))
      bitpos += unit - GET_MODE_BITSIZE (GET_MODE (op0));

----
Jessica Han
Open Source Tools 
Hewlett-Packard
(408) 447-6154 



More information about the Gcc-patches mailing list