delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/02/10:01:33

Date: Wed, 2 Dec 1998 16:58:18 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tal Lavi <ranla AT post DOT tau DOT ac DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: Extended ASM (Was: misc questions)
In-Reply-To: <ranla.141.0007BEE0@post.tau.ac.il>
Message-ID: <Pine.SUN.3.91.981202164845.27255C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 2 Dec 1998, Tal Lavi wrote:

> I checked the info's, but I'm still not that sure what "rI", "rm" does
> I *think* that rI is a register which holds an integer value, but what does 
> "rm" do?

These are called ``constraints''.  There's a whole bunch of them, but 
unfortunately the GCC docs only explain some.

> Can anyone tell me what does
> %w0 , %w1, %k2   &   .byte 0x64  means?

The first are constraints again, and ".byte 0x64" causes the assembler to 
emit 0x64 into the binary code.  0x64 is the op-code for FS: prefix 
override (meaning the next instruction uses offsets into the segment 
whose selector is in the FS register).  sys/farptr.h uses a byte constant 
because early versions of Gas didn't support prefixes (I'm not sure how 
the things are with Binutils 2.8.1).

> Is there a complete extended asm giude somewhere? 

Search the mail archives (http://www.delorie.com/djgpp/mail-archives/) 
for a message posted by Salvador Eduardo Tropea (SET) about a month or 
two ago, with the subject "CONSTRAINTS" (I think).  There's a full list 
of all the constraints known to man in that message ;-).

As for the other parts of the black art of inline assembly, there's 
nothing apart of the GCC docs and the tutorial pointed to by the FAQ 
(sections 17.1 and 18.13).  If you have already studied those, you will 
have to ask further questions here.

- Raw text -


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