[Mesa-dev] [PATCH 5/6] mesa: replace _ASMAPI with __cdecl

Brian Paul brianp at vmware.com
Wed Mar 11 09:52:06 PDT 2015


On 03/11/2015 08:21 AM, Jose Fonseca wrote:
> On 11/03/15 14:07, Brian Paul wrote:
>> On 03/11/2015 01:29 AM, Jose Fonseca wrote:
>>> I don't know the story about this _ASMAPI macro, but __cdecl is also the
>>> default calling convention for WIN32:
>>>
>>>    https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx
>>
>> Yeah, I had read that too actually but I figured it was safer to keep
>> things as-is in case there was more to it than met the eye.
>>
>>
>>> so it's redundant to add it.  (The other common calling convention --
>>> __stdcall/APIENTRY/etc -- is the one that must always be explcitely
>>> added when needed).
>>>
>>> So we should just drop _ASMAPI/__cdecl completely.
>>
>> Note that we have something similar in gallium (grep PIPE_CDECL).  Maybe
>> that could be removed too.
>
> I suspect that's because we copied  src/mesa/x86/rtasm ->
> src/gallium/auxiliary/rtasm .
>
> (BTW, it would be a nice beginner project to replace translate_sse to
> use LLVM and get rid of src/gallium/auxiliary/rtasm )
>
>> Anyway, I'll redo this patch series (rm all __cdecl) and do some testing
>> on Windows.

Heh, since we removed the old swrast-based Windows gdi driver, I believe 
that none of functions that were tagged with __cdecl (mesa/math/ and 
swrast/) are used on Windows now anyway.

New patch series coming...

-Brian



More information about the mesa-dev mailing list