This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for PR target/21723, hppa 1.0 bootstrap failure
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: sje at cup dot hp dot com (Steve Ellcey)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Jul 2005 17:24:19 -0400 (EDT)
- Subject: Re: Patch for PR target/21723, hppa 1.0 bootstrap failure
> Are you suggesting
>
> #define HARD_REGNO_NREGS(REGNO, MODE) \
> (FP_REGNO_P (REGNO) \
> ? ((!TARGET_PA_11) \
> ? (GET_MODE_SIZE (MODE) + 8 - 1) / 8) \
> : (GET_MODE_SIZE (MODE) + 4 - 1) / 4) \
> : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
>
> or
>
> #define HARD_REGNO_NREGS(REGNO, MODE) \
> (FP_REGNO_P (REGNO) \
> ? ((!TARGET_PA_11 && GET_MODE_CLASS (MODE) != MODE_COMPLEX_FLOAT \
> && GET_MODE_CLASS (MODE) != MODE_COMPLEX_INT) \
> ? (GET_MODE_SIZE (MODE) + 8 - 1) / 8) \
> : (GET_MODE_SIZE (MODE) + 4 - 1) / 4) \
> : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
>
> I don't think the first one will work because it will still try to put a
> single precision floating point complex into a single FP register
> (SCmode being 8 bytes) and that is what is causing the current problem.
> I believe the second version will work and I can try that.
I see your point. I was thinking the first version was appropriate.
It's essentially the example in tm.texi. The second version returns
the wrong value for DCmode. If your point is correct, we should divide
the mode size of complex modes by two and return twice as many registers,
at least when using floating registers and possibly when using general
registers. For example, I'm not sure how many general registers
are needed for CQImode. The current formula would return 1 register.
The value would fit but requires extraction. Extraction of the SCmode
values stored in a PA 1.0 floating point register is possible but
horribly inefficient.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)