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] |
The documentation is misleading about number of arguments passed in SSE registers to local and sseregparm functions. Correct number is 3, as shown in this testcase:
static double __attribute__((noinline)) foo_d(double a, double b, double c, double d) { return a + b + c +d; }
void test() { x = foo_d(a, b, c, d); }
foo_d: addsd %xmm1, %xmm0 addsd %xmm2, %xmm0 addsd 4(%esp), %xmm0 <<< 4th argument comes from stack
test: subl $8, %esp movsd d, %xmm3 movsd c, %xmm2 movsd %xmm3, (%esp) <<< 4th argument goes to stack movsd b, %xmm1 movsd a, %xmm0 call foo_d movsd %xmm0, x addl $8, %esp ret
Attached patch corrects documentation to reflect the reality. Patch was committed to SVN as obvious.
* config/i386/i386.c (ix86_function_sseregparm): Fix comment: number of arguments passed to local functions in SSE registers is 3.
* doc/invoke.texi (Function Attributes) [sseregparm]: Correct number of arguments passed in SSE registers to 3.
Attachment:
doc-sseregparm.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |