[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] ASM code in pygame
Yeah I was afraid of something like that. The constraints are the killer. It's
really not that big of deal to translate AT&T<-->Intel inline code; I've done
lots of it. I can do the translation for the next release.
Richard
Lenard Lindstrom wrote:
When you offered to write Intel versions of the AT&T code I looked for a
way to automate some of the translation process. So I tried using the
-masm=intel and -S compiler options to translate the inline assembly
code and write it to an .s file. The inlined instructions were simply
copied. So it is unlikely gcc can handle VC like __asm statements, where
the compiler definitely needs to understand assembly code. The MSDN does
say the VC compiler has a built in assembler. gcc compilers only
generates assembly output for the next stage in the compilation process.
So I tried compiling a simple assembly code example in MSDN which calls
printf, and gcc C did not recognize the __asm keyword. Finally, I just
found a mingw-users thread* where Thomas Heller of ctypes fame was
looking for a inline assembly formated recognized by both gcc and VC. No
luck. The advice was to use assembly files and a free assembler like
NASM or as. Not helpful when distutils doe not directly support
assembler files. This is not promising.
Lenard