Thread: Calling conventions

  1. #16
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by CornedBee View Post
    I trust Wikipedia more than my year-old memories. :-)
    Maybe so. And I would agree.
    But anywhere i've been, i've seen stdcall being described as pushing right_to_left. Including the msdn link you just provided.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Mario F. View Post
    So we are left with the first only. It's not clear to me why stack push order doesn't have an effect on argument evaluation. I have limited knowledge on these things and so I would like to know more about how arguments are evaluated.
    It is not dependent on this DIRECTLY - it is up to the compiler to come up with arguments for the function, and if it sees fit, it may decide to call function baz() first, then function bar(). But if it thinks that it will work out better to call bar() first, then baz() for some reason, then it can do that. What it THEN does with the return values from those functions is a different matter - it must of course push them in the right order.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stack issues when calling a COM library
    By notnot in forum C Programming
    Replies: 3
    Last Post: 06-01-2009, 02:12 AM
  2. Forcing code conventions
    By audinue in forum Tech Board
    Replies: 28
    Last Post: 03-31-2009, 08:46 AM
  3. Replies: 2
    Last Post: 09-16-2005, 11:44 PM
  4. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 03:35 AM
  5. calling conventions
    By Micko in forum C Programming
    Replies: 2
    Last Post: 07-18-2004, 09:13 AM