delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/28/00:31:55

Message-Id: <s15ac7b1.016@MAIL.TAIT.CO.NZ>
Date: Thu, 28 Mar 1996 17:09:29 +1200
From: Bill Currie <bill_currie AT MAIL DOT TAIT DOT CO DOT NZ>
To: djgpp AT delorie DOT com
Subject: Assembler problems

The following code keeps giving me two "cannot reload integer constant int 'asm'" errors.
cmds is a member of TCommandSet and I'm compiling with -O3 (compiling without opitimisation
works but is not what I want).  How else can I get arround this and what exactly does this
error mean?

------------------------------------------------------
Boolean TCommandSet::has( int cmd )
{
    Boolean enabled;
    cmd&=0xff;
    asm ("
        btl     %2,%1
        xorl    %0,%0   <=== I've also tried %2,%2 and %2,%0 and %0,%2
        roll    $1,%0
        "
        :"a="(enabled)
        :"g"(cmds),"g"(cmd)
    );
    return enabled;
}
-------------------------------------------------------
Any help will be appreciated,
TIA
Bill


- Raw text -


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