This is the mail archive of the 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]

[PATCH,i386] PR58105 wrong code generation with multi-versioned functions

this patch fixes a wrong code generation issue in the i386 target, PR58105.

The i386 target has a feature that is called multi-versioned functions.
That is a function may have different implementations which are chosen based on
the cpuid information at runtime. That is done by a resolver function that
is generated by an i386 target hook. 

The reason why this failure happens is that the resolver function
looks like an alias in the assembler syntax and in the gimple tree structure,
and may therefore look like a valid candidate for inlining to the optimizer.
While it has to be so for technical reasons, the resolver function is not really
an alias of the ifunc function, it has not even the same signature.

Therefore the inlining of the resolver function generates wrong code, and has
to be avoided. That is what this patch does.

This patch fixes the following test cases:

Bernd Edlinger 		 	   		  

Attachment: changelog-resolver-func.txt
Description: Text document

Attachment: patch-resolver-func.diff
Description: Binary data

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