This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for HP-UX IA64 structure passing
- From: "Jessica Han" <jessica at cup dot hp dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Jun 2002 15:26:23 -0700
- Subject: Patch for HP-UX IA64 structure passing
- Reply-to: <jessica at cup dot hp dot com>
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