This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 3.1 Issues


Richard Henderson <rth@redhat.com> writes:

> On Tue, Mar 12, 2002 at 07:13:10AM +0100, Andreas Jaeger wrote:
>> -If your assembler instruction modifies memory in an unpredictable
>> +If your assembler instruction access memory in an unpredictable
>>  fashion, add @samp{memory} to the list of clobbered registers.
>
> *shrug*  If you have some concept of how large the memory you
> are accessing, you can also add it as an input.

How can I add this as input, it let's say I want to access ten bytes
of a string?

For now I've changed the paragraph to:

  If your assembler instructions access memory in an unpredictable
  fashion, add @samp{memory} to the list of clobbered registers.  This
  will cause GCC to not keep memory values cached in registers across
  the assembler instruction.  You will also want to add the
  @code{volatile} keyword if the memory affected is not listed in the
  inputs or outputs of the @code{asm}, as the @samp{memory} clobber does
  not count as a side-effect of the @code{asm}.  If you known how large the
  accessed memory is, you can add it as input or output but if this is not
  known, you should add @samp{memory}.

Further improvements are welcome,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]