? \ ? doc.patch ? tm.texi.dn Index: tm.texi =================================================================== RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v retrieving revision 1.402 diff -c -3 -p -r1.402 tm.texi *** tm.texi 4 Dec 2004 00:34:43 -0000 1.402 --- tm.texi 6 Dec 2004 19:29:05 -0000 *************** holding the constant. This restriction *** 5178,5183 **** --- 5178,5251 ---- of TLS symbols for various targets. @end deftypefn + @deftypefn {Target Hook} bool TARGET_VECTORIZE_MISALIGNED_MEM_OK (@var{mode}) + This hook should return true if a move* pattern to/from memory + can be generated for machine_mode @var{mode} even if the memory location + is unaligned. + If a move* of data to/from unaligned memory locations is not supported for + machine_mode @var{mode}, the hook should return false. + This hook is used by the autovectorizer, and when expanding a + @code{MISALIGNED_INDIRECT_REF} expression. + @end deftypefn + + @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void) + This hook should return the DECL of a function @var{f} that given an + address @var{addr} as an argument returns a mask @var{m} that can be + used to extract from two vectors the relevant data that resides in + @var{addr} in case @var{addr} is not properly aligned. + + The autovectrizer, when vectorizing a load operation from an address + @var{addr} that may be unaligned, will generate two vector loads from + the two aligned addresses around @var{addr}. It then generates a + @code{REALIGN_LOAD} operation to extract the relevant data from the + two loaded vectors. The first two arguments to @code{REALIGN_LOAD}, + @var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and + the third argument, @var{OFF}, defines how the data will be extracted + from these two vectors: if @var{OFF} is 0, then the returned vector is + @var{v2}; otherwise, the returned vector is composed from the last + @var{VS}-@var{OFF} elements of @var{v1} concatenated to the first + @var{OFF} elements of @var{v2}. + + If this hook is defined, the autovectorizer will generate a call + to @var{f} (using the DECL tree that this hook returns) and will + use the return value of @var{f} as the argument @var{OFF} to + @code{REALIGN_LOAD}. Therefore, the mask @var{m} returned by @var{f} + should comply with the semantics expected by @code{REALIGN_LOAD} + described above. + If this hook is not defined, then @var{addr} will be used as + the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low + log2(@var{VS})-1 bits of @var{addr} will be considered. + @end deftypefn + + @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE (void) + This hook should return the DECL of a function @var{f} that given an + address @var{addr} as an argument returns a mask @var{m} that can be + used to extract from two vectors the relevant data to be stored to @var{addr} + in case @var{addr} is not properly aligned. + + The autovectrizer, when vectorizing a store operation to an address + @var{addr} that may be unaligned, will create two vectors from which + data is to be stored into address @var{addr}. It then generates a + @code{REALIGN_STORE} operation to extract the relevant data from + these two vectors. The first two arguments of @code{REALIGN_STORE}, + @var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and + the third argument, @var{OFF}, defines how the data will be extracted + from these two vectors: if @var{OFF} is 0, then the returned vector is + @var{v1}; otherwise, the returned vector is composed from the last + @var{OFF} elements of @var{v1} concatenated to the first + @var{VS}-@var{OFF} elements of @var{v2}. + + If this hook is defined, the autovectorizer will generate a call + to @var{f} (using the DECL tree that this hook returns) and will + use the return value of @var{f} as the argument @var{OFF} to + @code{REALIGN_STORE}. Therefore, the mask @var{m} returned by @var{f} + should comply with the semantics expected by @code{REALIGN_STORE} + described above. + If this hook is not defined, then @var{addr} + will be used as the argument @var{OFF} to @code{REALIGN_STORE}, in which + case the low log2(@var{VS})-1 bits of @var{addr} will be considered. + @end deftypefn + @node Condition Code @section Condition Code Status @cindex condition code status