This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Does backend need to worry about overlap?
- From: James E Wilson <wilson at specifixinc dot com>
- To: Andy Hutchinson <HutchinsonAndy at netscape dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 22 Feb 2005 11:48:51 -0800
- Subject: Re: Does backend need to worry about overlap?
- References: <421A12A1.2050204@netscape.net>
Andy Hutchinson wrote:
do I need to guard against the possibility that the two operands
overlap?
Generally, overlapping operands won't happen because of the language
rules, except in special cases.
If you are defining builtins for string/memory operations, like strcpy
or memmove, then you have to handle overlapping operands if and only if
the equivalent C language function does.
If you are composing operations, e.g. combining two word sized moves
into a double-word move, and you don't require double-word alignment for
double-word moves, then you could accidentally create overlapping
operands. In this case, you either need to try to prevent creating
them, or modify the patterns to handle them.
There are probably some other cases. Whether this is a problem for you
really depends on what you are trying to do.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com