delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/14/02:14:02

Message-Id: <199808140613.HAA10458@sable.ox.ac.uk>
Comments: Authenticated sender is <mert0407 AT sable DOT ox DOT ac DOT uk>
From: "George Foot" <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: Vic <tudor AT cam DOT org>
Date: Fri, 14 Aug 1998 07:12:27 +0000
MIME-Version: 1.0
Subject: Re: DJGPP and MMX
Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk
CC: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019