Mail Archives: djgpp/1998/08/14/02:14:02
On 13 Aug 98 at 20:51, Vic wrote:
> Ishpeck wrote:
> >
> > That's a good one. As far as I know, It doesn't... but, that's just
> > an assumption, not fact... tell me when you firgure it out, if you don't
> > mind.
>
> yes, I don't think inline asm does that either, but there are ways to
> use MMX of course. one is to manually input the bytecodes. another is to
> use NASM which supports MMX instructions
I don't know the nature of MMX instructions, but perhaps it would be
possible to define macros (either gas macros or cpp macros) and
include them in the .s/.S source (using either gas or cpp), where the
macros expand to the appropriate ".byte" sequences.
This wouldn't work inline, I don't think, because cpp won't expand
macros inside string literals and I think it would be unwise to use
gas macros inside source produced by gcc, because of the (remote)
possibility of a clash. You could do:
#define MMX_SOME_OP "\t.byte 1,2,3,4,5 ; MMX_SOME_OP \n"
for some MMX operation, then:
asm (
" movl $5, %eax \n"
" movl $2, %ebx \n"
MMX_SOME_OP
" movl %eax, %ebx \n"
);
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -