From: Doug Evans Date: Wed, 19 Aug 2009 17:17:24 +0000 (+0000) Subject: Improve operand docs on `foo' vs `o-foo'. X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=8444cd1d8c17793868061976b2c885e3df1477ce;p=cgen.git Improve operand docs on `foo' vs `o-foo'. --- diff --git a/ChangeLog b/ChangeLog index ba86478..4b041dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed in assembler syntax. + (Operands): Similarly. 2009-08-18 Doug Evans diff --git a/doc/rtl.texi b/doc/rtl.texi index 86a98cc..b876dc9 100644 --- a/doc/rtl.texi +++ b/doc/rtl.texi @@ -1614,9 +1614,6 @@ The syntax for defining an operand is: The required elements are: @code{name}, @code{type}, @code{mode}, and if @code{type} is not a scaler @code{index}. -There is no convention for prefixing operands, -and generally for readability's sake operands don't have a prefix. - @subsection name This is the name of the operand as a Scheme symbol. @@ -1630,6 +1627,12 @@ with @samp{f-} and hardware elements begin with @samp{h-}). A prefix like @samp{o-} would avoid collisions with other semantic elements, but operands are used often enough that any prefix is a hassle. +Note that if you @emph{do} decide to prefix operand names, e.g. use +a style like @samp{o-foo}, then you will need to remember to use the +@samp{$@{o-foo@}} form in the assembler syntax and not the @samp{$o-foo} +form because the latter only takes alphanumeric characters. +@xref{assembler-syntax, syntax}. + @subsection attrs A list of attributes. In addition to attributes defined for the operand, @@ -1968,6 +1971,7 @@ real insn. For macro-instructions, don't use during disassembly. @end table +@anchor{assembler-syntax} @subsection syntax This is a character string consisting of raw characters and operands.