delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/22/21:26:18

To: djgpp AT delorie DOT com
Subject: Re: (none)
References: <E0yd1Uo-0004MJ-01 AT mail DOT sun DOT ac DOT za> <wanpsm98 DOT 895884272 AT octarine>
From: M DOT A DOT Bukin AT inp DOT nsk DOT su
Date: 23 May 1998 08:23:24 +0700
In-Reply-To: wanpsm98@octarine.adfa.oz.au's message of "23 May 98 00:44:32 GMT"
Message-ID: <20hg2hhjar.fsf@Sky.inp.nsk.su>
Lines: 25

wanpsm98 AT octarine DOT adfa DOT oz DOT au (WANKADIA PAUL SAPAL MICHAEL) writes:

> "lou smith" <9813152 AT fharga DOT sun DOT ac DOT za> writes:
> 
> >why do i get a "operands given dont match any known 386 instruction 
> >?" error when i insert the following into a inline assembly function.
> >        "subl  %k1, %k2		\n\t"
>                  ^    ^
> I've forgotten what the 'k' indicator-thingy means ... is it, perhaps, 
> the problem?

  'k' means long variant of argument (e.g. if 1st constraint was 'a', then
'%k1' means '%eax', '%b1' means '%al').  AFAIK, there are also 'w' and 'h'.

  To original poster.  Use '-S' switch to gcc and examine generated
assembly listing, particulary what operands were used for this subl
instruction.  For example, something->immediate or memory->memory is
imposible combination of operands for Ix86.  I suspect you are using
'g' constraint for the second operand and it can be immediate then.
Or 'm' constraints for both, which may give you both operands to be
memory.

  Constraint types are documented in gcc info:

info.exe gcc machine constr

- Raw text -


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