This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [RFC PATCH, i386]: Pass FP arguments in i387 registers


On 10/12/06, Uros Bizjak <ubizjak@gmail.com> wrote:
Hello!

This patch implements i387 register passing ABI extension for FP
function arguments:
a) unconditionally passes XFmode arguments of local functions in i387 registers
b) passes DFmode and SFmode arguments of local functions in i387
registers for -ffast-math

c) for -m387regparm, passes XFmode arguments in i387 registers
d) for -m387regparm, passes DFmode and SFmode arguments in 387
registers if -ffast-math is selected

This patch also cares for -msseregparm setting and doesn't step on its toes.

The patch mostly looks ok, though I wonder about the FIXME in regstack and


+  /* For local functions, pass up to X87_REGPARM_MAX floating point
+     arguments in x87 registers.  */
+  if (!TARGET_64BIT && decl
+      && flag_unit_at_a_time && !profile_flag)
+    {
+      struct cgraph_local_info *i = cgraph_local_info (decl);
+      if (i && i->local)
+	return 1;
+    }

shouldn't we disable this if !(ix86_fpmath & FPMATH_387)?  How will the code
decide where to pass SF/DFmode arguments if -mfpmath=387,sse is in effect?

Richard.


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