[Bug target/39476] Typo in ix86_function_regparm in i386.c
ktietz at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Mar 17 09:39:00 GMT 2009
------- Comment #4 from ktietz at gcc dot gnu dot org 2009-03-17 09:39 -------
(In reply to comment #1)
> It is
> if (TARGET_64BIT)
> {
> if (ix86_function_type_abi (type) == DEFAULT_ABI)
> return regparm;
> return DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
> }
> Shouldn't it be
> return DEFAULT_ABI == SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
No, it shouldn't. The old test checks first if the calling abi specified via
type is the default one. As you noticed, regparm is never changed for 64-bit.
The second check is for *foreign* abi and has to return in inverse logic.
The patch in comment #2 is ok.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39476
More information about the Gcc-bugs
mailing list