On Mon, Nov 11, 2013 at 11:30 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > There was something wrong with Bernd's address, retrying. > >>> Currently on trunk the option -mpreferred-stack-boundary does not work >>> together with #pragma GCC target("sse") or __attribute__((target("sse"))). >>> >>> There is already a test case that detects this: >>> gcc.target/i386/fastcall-sseregparm.c >>> >>> The attached patch fixes this test case under i686-pc-linux-gnu. >>> >>> Boot-strapped and regression-tested under i686-pc-linux-gnu. >>> >>> OK for trunk? >> >> I'm not experienced enough in this new option handling stuff, let's >> ask Sriraman for his opinion on the patch.
I do not think this is the right fix, I am wondering how many other target flags we may have to copy this way from global_options. I notice that other flags like ix86_regparm and ix86_incoming_stack_boundary_arg are very similar. Why should this need to be restored from global_options explicitly? This patch may fix the issue but it seems like a hack to me. We should be able to restore whatever we need from target_option_default_node via ix86_function_specific_restore. Maybe modifying the i386.opt file to make ix86_preferred_stack_boundary_arg a variable might fix it. See ix86_isa_flags for instance in i386.opt. Please let me know what you think. Thanks Sri > > Uros.