This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does backend need to worry about overlap?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]