[SDL] x86 asm blitters, win32/MSVC?

Stephane Marchesin stephane.marchesin at wanadoo.fr
Tue Sep 13 14:51:53 PDT 2005

Alex Volkov wrote:
> Stephane Marchesin wrote:
>>>I am wondering if there is a particular (and obvious?) reason why x86 
>>>asm blitters are not included/built by the MSVC project file. I 
>>>realize the gcc inline asm code cannot be built by MSVC, but what 
>>>about the Hermes nasm code? I've built SDL w/ Hermes successfully with
>>>MSVC -- no problems.
>>So you say. Nasm/win32 has been causing us more than its share of
>>issues. When I finally find the time, my plan is to rewrite the
>>nasm blitters for gas.
> Could you elaborate on nasm/win32 problems please? Or at least point me in
> the direction of some articles perhaps? I am really curious, as I've been
> using win32 nasm for years.

Well, you can google the SDL mailing list. Not nasm issues per se, but 
side effects of using multiple tools for the same job.

>>Next versions of visual C will _not_ support inline asm. So an
>>external assembler like nasm is the only choice for assembly
>>with visual C.
>>I think the solution is to build SDL with gcc (mingw or cygwin) to benefit
>>from the mmx code, even if only for the releases.
> The problem with using cygwin builds, is that the dll linkage .lib's it
> creates cannot be used with VC6 (most likely not v5 either, not sure about
> v7+). Perhaps the makefile just needs an option somewhere, I am not sure.
> The SDL.dll, however, can be used without problems.

That's what I meant with 'even if only for the release'.

> In any case, the blitters could also be done using MSVC MMX/SSE intrinsics.
> Do you know if the next versions of VC will support those or if there are
> any other serious counterindications to doing so? Worst case, the blitters
> could also be done in MASM, if necessary.

As I said, inline asm will not be supported. You have to use an external 
assembler if you want to be future proof. Or take the simpler way : use gcc.


More information about the SDL mailing list