Hello, Thanks for asking !
The first item (32 bytes shadow space on stack ), has been workarounded but we miss the understanding of the behavior : For functions having more than 6 parameters, we see that the 7th and above parameters are sometimes written at stack offset 0, and sometimes at stack offset 32, depending on the function. When calling the function through a pointer, the behavior is constant i.e. 7th and above parameters are written at stack offset 32. The second item (xmm6 and xmm7) is fine. We observed that xmm6 and xmm7 are saved on the stack before the call. Regards, Marc -----Message d'origine----- De : NightStrike [mailto:nightstr...@gmail.com] Envoyé : jeudi 17 mars 2011 15:53 À : Amstoutz Marc Cc : Kai Tietz; mingw-w64-public@lists.sourceforge.net Objet : Re: [Mingw-w64-public] can the function attribute __sysv_abi__ be used to call amd64 asm functions ? On Fri, Feb 4, 2011 at 1:09 PM, Amstoutz Marc <marc.amsto...@thomson-networks.com> wrote: > Hello Kai, > > It seems to work for the registers usage as far as we checked the assembly. > > I have an additional couple of questions : > > - the ms_abi uses 32 bytes shadow space on stack, and we observe this offset > is kept when using sysv_abi attribute. Is there a way to deal with this > offset, while avoiding modifying the callee function ? > > - our assembly code uses xmm6 and xmm7, which should be preserved within > ms_abi. Is there a way telling the compiler that a our functions will modify > those registers ? Is this still an issue for you? > Regards, > Marc > -----Message d'origine----- > De : Kai Tietz [mailto:ktiet...@googlemail.com] > Envoyé : mercredi 2 février 2011 11:30 > À : Amstoutz Marc > Cc : mingw-w64-public@lists.sourceforge.net > Objet : Re: [Mingw-w64-public] can the function attribute __sysv_abi__ be > used to call amd64 asm functions ? > > 2011/2/2 Amstoutz Marc <marc.amsto...@thomson-networks.com>: >> Hello experts, >> >> >> >> I would like to use asm functions that were written for a linux-64 >> application within mingw64 target. >> >> After some searches (gcc function attributes and ioquake3 project), I found >> that decorating the prototypes of those functions with sysv_abi could be an >> option. >> >> Do you think this could work ? >> >> >> >> Regards, >> >> Marc > > Hello Marc, > > yes, this should work. A bit special are variadic functions, as here > the special abi va_list types (builtins) are necessary. For example > you can see in gcc.target/i386 the test-cases for sysv_abi/ms_abi. > > Regards, > Kai > > ------------------------------------------------------------------------------ > The modern datacenter depends on network connectivity to access resources > and provide services. The best practices for maximizing a physical server's > connectivity to a physical network are well understood - see how these > rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public