From: Nicklas Bo J. <nbj...@gm...> - 2012-05-22 20:42:18
|
Thanks for the link, very nice overview. Are the following tests obsolete? - Returning void? - Returning the first parameter, which is already in the correct place? Do we need additional tests for returning, besides returning immediate and argument, like returning a value from register or is it already covered in returning a argument? On Tue, May 22, 2012 at 9:01 PM, John Myers <ato...@gm...> wrote: > > > On Tue, May 22, 2012 at 11:34 AM, Nicklas Bo Jensen <nbj...@gm...>wrote: > >> Perfect :) >> >> I'm moving on to calling convention and have started with return values. >> However I'm a bit unsure what the calling convention actually is. For >> example with my last test, called "return64_arg2" in the attached .ll file >> and the generated assembly in the .s file, is the correct thing happening >> and how it should be tested? Couldn't we have passed the arguments in the >> normal registers? I.e. r25:r2. >> >> If the arguments don't fit in the registers, do we always store the >> result in the same place in ram? >> > > It should be placed on the stack so the exact place in ram will vary. > > Calling Convention / ABI: > http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage > |