News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Re: X64 ABI, REAL8 passed in xmmreg?

Started by jj2007, April 09, 2021, 11:23:41 PM

Previous topic - Next topic

jj2007

#30
Quote from: nidud on April 12, 2021, 08:04:36 PM
it kicks in at the :VARARG position.

Good point, thanks :thumbsup:

Is there any "mixed" WinAPI call that you know of? There are more than 1,000 VARARG API calls in \Masm32\include...

Just for fun, I checked it (source & exe attached):
include \masm32\MasmBasic\MasmBasic.inc
  SetGlobals ctVar, ctMixed
  Init
  GetFiles "\Masm32\include\*.inc"
  PrintLine Str$("%i files found\n", eax)
  For_ fcount=0 To Files$(?)-1
Recall Files$(fcount), L$()
For_ ct=0 To eax-1
mov esi, L$(ct)
.if Instr_(esi, ":VARARG")
inc ctVar
lea ecx, [edx+6] ; +6 for len(":VARARG")
.if Len(esi)!=ecx
inc ctMixed
Print Str$("\n%___i", ct), esi
.endif
.endif
Next
  Next
  Inkey Str$("\n%i vararg calls found", ctVar), Str$(", of which %i are mixed", ctMixed)
EndOfCode

nidud

#31
deleted

jj2007

Quote from: nidud on April 12, 2021, 11:22:17 PM
It's common in graphic code to use long arrays of floats and VARARG

There are some other candidates, too:
frequency of VARARG:
184  \Masm32\include\wldap32.inc
150  \Masm32\include\wdmsec.inc
102  \Masm32\include\psxdll.inc
076  \Masm32\include\wdm.inc
065  \Masm32\include\ntoskrnl.inc
063  \Masm32\include\netlib.inc
056  \Masm32\include\miglib.inc
050  \Masm32\include\parser.inc
049  \Masm32\include\npptools.inc
042  \Masm32\include\thunk32.inc
026  \Masm32\include\dnslib.inc
025  \Masm32\include\mapi32.inc
021  \Masm32\include\dnsrpc.inc
013  \Masm32\include\vfw32.inc
013  \Masm32\include\rpcrt4.inc
010  \Masm32\include\cabinet.inc
008  \Masm32\include\rxapi.inc
008  \Masm32\include\odbc32.inc
008  \Masm32\include\ntdll.inc
007  \Masm32\include\ntvdm.inc


With GetFiles "\Masm32\include\g*.inc":
frequency of VARARG:
000  \Masm32\include\gpedit.inc
000  \Masm32\include\glu32.inc
000  \Masm32\include\glmf32.inc
000  \Masm32\include\glaux.inc
000  \Masm32\include\gdiplus.inc
000  \Masm32\include\gdi32.inc
000  \Masm32\include\gapi32.inc