rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for addressing modes with side effects.
* rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for addressing modes with side effects. These are currently placeholders for the C4x target. From-SVN: r23228
This commit is contained in:
parent
f76707606e
commit
b18cfc2861
@ -1,3 +1,9 @@
|
||||
Fri Oct 23 11:11:56 1998 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
|
||||
|
||||
* rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for
|
||||
addressing modes with side effects. These are currently
|
||||
placeholders for the C4x target.
|
||||
|
||||
Thu Oct 22 16:46:35 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
|
||||
|
||||
* loop.c (express_from): Make sure that when generating a PLUS of
|
||||
|
@ -723,6 +723,14 @@ DEF_RTL_EXPR(PRE_INC, "pre_inc", "e", 'x')
|
||||
DEF_RTL_EXPR(POST_DEC, "post_dec", "e", 'x')
|
||||
DEF_RTL_EXPR(POST_INC, "post_inc", "e", 'x')
|
||||
|
||||
/* These binary operations are used to represent generic address
|
||||
side-effects in memory addresses, except for simple incrementation
|
||||
or decrementation which use the above operations. They are
|
||||
created automatically by the life_analysis pass in flow.c.
|
||||
(Note that these operators are currently placeholders.) */
|
||||
DEF_RTL_EXPR(PRE_MODIFY, "pre_modify", "ee", 'x')
|
||||
DEF_RTL_EXPR(POST_MODIFY, "post_modify", "ee", 'x')
|
||||
|
||||
/* Comparison operations. The ordered comparisons exist in two
|
||||
flavors, signed and unsigned. */
|
||||
DEF_RTL_EXPR(NE, "ne", "ee", '<')
|
||||
|
34
gcc/rtl.texi
34
gcc/rtl.texi
@ -2036,7 +2036,7 @@ and of @var{min} and @var{max} to @var{base}. See rtl.def for details.@refill
|
||||
@cindex RTL predecrement
|
||||
@cindex RTL postdecrement
|
||||
|
||||
Four special side-effect expression codes appear as memory addresses.
|
||||
Six special side-effect expression codes appear as memory addresses.
|
||||
|
||||
@table @code
|
||||
@findex pre_dec
|
||||
@ -2071,6 +2071,38 @@ being decremented.
|
||||
@findex post_inc
|
||||
@item (post_inc:@var{m} @var{x})
|
||||
Similar, but specifies incrementing @var{x} instead of decrementing it.
|
||||
|
||||
@findex post_modify
|
||||
@item (post_modify:@var{m} @var{x} @var{y})
|
||||
|
||||
Represents the side effect of setting @var{x} to @var{y} and
|
||||
represents @var{x} before @var{x} is modified. @var{x} must be a
|
||||
@code{reg} or @code{mem}, but most machines allow only a @code{reg}.
|
||||
@var{m} must be the machine mode for pointers on the machine in use.
|
||||
The amount @var{x} is decremented by is the length in bytes of the
|
||||
machine mode of the containing memory reference of which this expression
|
||||
serves as the address. Note that this is not currently implemented.
|
||||
|
||||
The expression @var{y} must be one of three forms:
|
||||
@table @code
|
||||
@code{(plus:@var{m} @var{x} @var{z})},
|
||||
@code{(minus:@var{m} @var{x} @var{z})}, or
|
||||
@code{(plus:@var{m} @var{x} @var{i})},
|
||||
@end table
|
||||
where @var{z} is an index register and @var{i} is a constant.
|
||||
|
||||
Here is an example of its use:@refill
|
||||
|
||||
@example
|
||||
(mem:SF (post_modify:SI (reg:SI 42) (plus (reg:SI 42) (reg:SI 48))))
|
||||
@end example
|
||||
|
||||
This says to modify pseudo register 42 by adding the contents of pseudo
|
||||
register 48 to it, after the use of what ever 42 points to.
|
||||
|
||||
@findex post_modify
|
||||
@item (pre_modify:@var{m} @var{x} @var{expr})
|
||||
Similar except side effects happen before the use.
|
||||
@end table
|
||||
|
||||
These embedded side effect expressions must be used with care. Instruction
|
||||
|
Loading…
Reference in New Issue
Block a user