Sorry, forgot to mention: This patch has been bootstrapped and regression tested on i686-pc-linux-gnu.
> 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: > g++.dg/ext/mv2.C > g++.dg/ext/mv5.C > g++.dg/ext/mv12.C > > Regards > Bernd Edlinger
2013-08-13 Bernd Edlinger <bernd.edlin...@hotmail.de> PR target/58105 Fixed wrong code generation for multiversioned functions. * gcc/config/i386/i386.c (make_resolver_func): Set DECL_UNINLINABLE.
patch-resolver-func.diff
Description: Binary data