[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] ASM code in pygame
hello,
for your info...
gcc supports intel syntax with a command line option.
-masm=intel
SDL uses macros for portable asm, I think.
On Mon, Mar 10, 2008 at 5:04 AM, Richard Goedeken
<SirRichard@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Lenard Lindstrom wrote:
> > Deciding how to handle assembly code in future Pygame releases will
> > probably take up its own mailing list thread. But when I do a Google
> > search on the topic of Intel assembly code and gcc I get this,
> > http://www.acm.uiuc.edu/sigmil/RevEng/ch02.html , which claims the GNU
> > assembler 'as' "takes input as an AT&T or Intel syntax asm file".
> > Pygame's assembly routines will likely end up in there own libraries and
> > be linked in, possibly dynamically, as needed. So gcc C will no longer
> > be a factor for assembly language compatibility.
>
> GUN 'as' may take intel-style code, but I'm pretty sure that the compiler (GCC)
> will only accept the AT&T style. The back end of the compiler needs to know the
> input/output registers, and if that information is not explicitly given in the
> extended-asm syntax, then the compiler must parse the ASM and extract the
> information by itself. This is what VC does, but I think GCC probably doesn't
> have support for this.
>
> If you're considering keeping separate libraries for the ASM code then I think
> breaking the code out into .asm files and assembling it with NASM/YASM is the
> right way to go.
>
> Richard
>