Patch: Make _mm_prefetch accept const pointers
Silvius Rus
rus@google.com
Wed Jan 30 01:07:00 GMT 2008
Patch Description
=================
This patch fixes a regression from 4.2.1.
Without this change, the following code compiles at -O2 with 4.2.1, but
not with current trunk:
const void* a = ...;
_mm_prefetch (a, ...);
The proposed change adds "const" to the first parameter of _mm_prefetch.
-_mm_prefetch (void *__P, enum _mm_hint __I)
+_mm_prefetch (const void *__P, enum _mm_hint __I)
The proposed change would make the signature closer to the corresponding
one in the Intel C++ compiler for Linux, which is "void
_mm_prefetch(char const*a, int sel)". See
http://www.intel.com/software/products/compilers/clin/docs/ug_cpp/comm1030.htm.
Tested
======
Bootstrapped on i686.
make -k check showed no regression with vs. without this proposed patch.
gcc/ChangeLog
=============
2008-01-29 Silvius Rus <rus@google.com>
* config/i386/xmmintrin.h (_mm_prefetch): Add const to first arg.
Thank you,
Silvius
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mm_prefetch.patch
Type: text/x-patch
Size: 521 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080130/8812b3c0/attachment.bin>
More information about the Gcc-patches
mailing list