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

Jose Fonseca jfonseca at vmware.com
Wed Mar 11 07:21:21 PDT 2015


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.
>
> -Brian
>

Jose


More information about the mesa-dev mailing list