re PR testsuite/44701 (PR44492 fix broke gcc.target/powerpc/asm-es-2.c)
PR testsuite/44701 * doc/md.texi: Clarify m and es constraints on PowerPC and m and S constraints on IA-64. * gcc.target/powerpc/asm-es-2.c (f2): Add <> constraints. From-SVN: r162581
This commit is contained in:
parent
9b04fa9118
commit
fea31288e6
@ -1,3 +1,9 @@
|
|||||||
|
2010-07-27 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR testsuite/44701
|
||||||
|
* doc/md.texi: Clarify m and es constraints on PowerPC and m and S
|
||||||
|
constraints on IA-64.
|
||||||
|
|
||||||
2010-07-27 Jie Zhang <jie@codesourcery.com>
|
2010-07-27 Jie Zhang <jie@codesourcery.com>
|
||||||
|
|
||||||
PR target/44290
|
PR target/44290
|
||||||
|
@ -1998,31 +1998,33 @@ Integer/Floating point constant that can be loaded into a register using
|
|||||||
three instructions
|
three instructions
|
||||||
|
|
||||||
@item m
|
@item m
|
||||||
Memory operand. Note that on PowerPC targets, @code{m} can include
|
Memory operand.
|
||||||
addresses that update the base register. It is therefore only safe
|
Normally, @code{m} does not allow addresses that update the base register.
|
||||||
to use @samp{m} in an @code{asm} statement if that @code{asm} statement
|
If @samp{<} or @samp{>} constraint is also used, they are allowed and
|
||||||
|
therefore on PowerPC targets in that case it is only safe
|
||||||
|
to use @samp{m<>} in an @code{asm} statement if that @code{asm} statement
|
||||||
accesses the operand exactly once. The @code{asm} statement must also
|
accesses the operand exactly once. The @code{asm} statement must also
|
||||||
use @samp{%U@var{<opno>}} as a placeholder for the ``update'' flag in the
|
use @samp{%U@var{<opno>}} as a placeholder for the ``update'' flag in the
|
||||||
corresponding load or store instruction. For example:
|
corresponding load or store instruction. For example:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
asm ("st%U0 %1,%0" : "=m" (mem) : "r" (val));
|
asm ("st%U0 %1,%0" : "=m<>" (mem) : "r" (val));
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
is correct but:
|
is correct but:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
asm ("st %1,%0" : "=m" (mem) : "r" (val));
|
asm ("st %1,%0" : "=m<>" (mem) : "r" (val));
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
is not. Use @code{es} rather than @code{m} if you don't want the
|
is not.
|
||||||
base register to be updated.
|
|
||||||
|
|
||||||
@item es
|
@item es
|
||||||
A ``stable'' memory operand; that is, one which does not include any
|
A ``stable'' memory operand; that is, one which does not include any
|
||||||
automodification of the base register. Unlike @samp{m}, this constraint
|
automodification of the base register. This used to be useful when
|
||||||
can be used in @code{asm} statements that might access the operand
|
@samp{m} allowed automodification of the base register, but as those are now only
|
||||||
several times, or that might not access it at all.
|
allowed when @samp{<} or @samp{>} is used, @samp{es} is basically the same
|
||||||
|
as @samp{m} without @samp{<} and @samp{>}.
|
||||||
|
|
||||||
@item Q
|
@item Q
|
||||||
Memory operand that is an offset from a register (it is usually better
|
Memory operand that is an offset from a register (it is usually better
|
||||||
@ -2194,10 +2196,9 @@ Application register residing in I-unit
|
|||||||
Floating-point register
|
Floating-point register
|
||||||
|
|
||||||
@item m
|
@item m
|
||||||
Memory operand.
|
Memory operand. If used together with @samp{<} or @samp{>},
|
||||||
Remember that @samp{m} allows postincrement and postdecrement which
|
the operand can have postincrement and postdecrement which
|
||||||
require printing with @samp{%Pn} on IA-64.
|
require printing with @samp{%Pn} on IA-64.
|
||||||
Use @samp{S} to disallow postincrement and postdecrement.
|
|
||||||
|
|
||||||
@item G
|
@item G
|
||||||
Floating-point constant 0.0 or 1.0
|
Floating-point constant 0.0 or 1.0
|
||||||
@ -2233,7 +2234,9 @@ Non-volatile memory for floating-point loads and stores
|
|||||||
Integer constant in the range 1 to 4 for @code{shladd} instruction
|
Integer constant in the range 1 to 4 for @code{shladd} instruction
|
||||||
|
|
||||||
@item S
|
@item S
|
||||||
Memory operand except postincrement and postdecrement
|
Memory operand except postincrement and postdecrement. This is
|
||||||
|
now roughly the same as @samp{m} when not used together with @samp{<}
|
||||||
|
or @samp{>}.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item FRV---@file{config/frv/frv.h}
|
@item FRV---@file{config/frv/frv.h}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2010-07-27 Jakub Jelinek <jakub@redhat.com>
|
2010-07-27 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR testsuite/44701
|
||||||
|
* gcc.target/powerpc/asm-es-2.c (f2): Add <> constraints.
|
||||||
|
|
||||||
PR c/45079
|
PR c/45079
|
||||||
* gcc.dg/pr45079.c: New test.
|
* gcc.dg/pr45079.c: New test.
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ f2 (int *p)
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
p += 4;
|
p += 4;
|
||||||
asm ("asm2%U0 %0" : "=m" (*p));
|
asm ("asm2%U0 %0" : "=m<>" (*p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user