diff options
author | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-22 16:11:16 +0000 |
---|---|---|
committer | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-22 16:11:16 +0000 |
commit | cbd845cd8c2efbfbdea767070a9d203267dc761c (patch) | |
tree | 5d2fc6e699cf3bcf783dee5bbc6986bc78316e23 /gcc | |
parent | 80e36cd80cc59b97d54abc221d12cf7b6ed4bbe1 (diff) | |
download | ppe42-gcc-cbd845cd8c2efbfbdea767070a9d203267dc761c.tar.gz ppe42-gcc-cbd845cd8c2efbfbdea767070a9d203267dc761c.zip |
* rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for
addressing modes with side effects. These are currently
placeholders for the C4x target.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23228 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/rtl.def | 8 | ||||
-rw-r--r-- | gcc/rtl.texi | 34 |
3 files changed, 47 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1e69851af9..23b3802564d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/rtl.def b/gcc/rtl.def index 85a91e8e32f..5273fdffa8c 100644 --- a/gcc/rtl.def +++ b/gcc/rtl.def @@ -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", '<') diff --git a/gcc/rtl.texi b/gcc/rtl.texi index 61aeb850e88..2e8e69a5de1 100644 --- a/gcc/rtl.texi +++ b/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 |