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

[Bug c/12122] gcc do not respect stack argument list order


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12122



------- Additional Comments From bland at mail dot ru  2003-09-01 08:07 -------
  May I bother you one more time? I understood your argumentation that this is
not a bug and agreed that basicly gcc is free to do such things.
But one thing is still confuses me. From the produced .s file I can see that
pushl instructions setups stack properly and ABI is not broken. But what the
reason than to make one more copy of 3 and 4 arguments than? Isn't this a
useless CPU time waste?
  Probably this explains more where it's come from. I porting software to
FreeBSD system wich makes stack copy like this to pass it to another process:

fn (int a1, int a2)
{
  void* buf_ptr = &a1;
  size_t buf_size = sizeof (a1) + sizeof (a2);
...
  send_args_to_daemon(cmd, buf_ptr, buf_size);
...
}

As you guess this code broken on gcc > 3


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