builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace BT_FN_VOID_PTR_VAR.

* builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace
        BT_FN_VOID_PTR_VAR.
        * builtins.def (BUILT_IN_PREFETCH): Change first argument to be const.
        * doc/extend.texi (__builtin_prefetch): Update documentation:
        first argument is now const void ptr.

        * gcc.c-torture/execute/builtin-prefetch-1.c: Changed first
        argument to __builtin_prefetch to be const ptr.

From-SVN: r49296
This commit is contained in:
Paul Koning 2002-01-28 12:07:01 -08:00 committed by Richard Henderson
parent 4debe14deb
commit 3bca17dda3
6 changed files with 28 additions and 15 deletions

View File

@ -1,3 +1,11 @@
2002-01-28 Paul Koning <pkoning@equallogic.com>
* builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace
BT_FN_VOID_PTR_VAR.
* builtins.def (BUILT_IN_PREFETCH): Change first argument to be const.
* doc/extend.texi (__builtin_prefetch): Update documentation:
first argument is now const void ptr.
2002-01-28 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300-protos.h: Remove an unused prototype.
@ -276,10 +284,10 @@ Fri Jan 25 20:43:56 CET 2002 Jan Hubicka <jh@suse.cz>
2002-01-24 Aldy Hernandez <aldyh@redhat.com>
* loop.c (emit_prefetch_instructions): Use the prefetch insn's
mode, not Pmode.
* loop.c (emit_prefetch_instructions): Use the prefetch insn's
mode, not Pmode.
* builtins.c (expand_builtin_prefetch): Same.
* builtins.c (expand_builtin_prefetch): Same.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
@ -300,7 +308,7 @@ Fri Jan 25 20:43:56 CET 2002 Jan Hubicka <jh@suse.cz>
2002-01-24 Andris Pavenis <pavenis@latnet.lv>
* config/i386/t-djgpp: Use NATIVE_SYSTEM_HEADER_DIR.
* config/i386/t-djgpp: Use NATIVE_SYSTEM_HEADER_DIR.
2002-01-24 Nick Clifton <nickc@cambridge.redhat.com>
@ -346,9 +354,9 @@ Fri Jan 25 20:43:56 CET 2002 Jan Hubicka <jh@suse.cz>
2002-01-23 Aldy Hernandez <aldyh@redhat.com>
* c-parse.in (parmlist_or_identifiers): Add maybe_attribute.
(parmlist_or_identifiers_1): Verify that only a parmlist follows
an attribute.
* c-parse.in (parmlist_or_identifiers): Add maybe_attribute.
(parmlist_or_identifiers_1): Verify that only a parmlist follows
an attribute.
2002-01-23 Richard Henderson <rth@redhat.com>

View File

@ -167,8 +167,8 @@ DEF_FUNCTION_TYPE_VAR_0 (BT_FN_PTR_VAR, BT_PTR)
DEF_FUNCTION_TYPE_VAR_1 (BT_FN_VOID_VALIST_REF_VAR,
BT_VOID, BT_VALIST_REF)
DEF_FUNCTION_TYPE_VAR_1 (BT_FN_VOID_PTR_VAR,
BT_VOID, BT_PTR)
DEF_FUNCTION_TYPE_VAR_1 (BT_FN_VOID_CONST_PTR_VAR,
BT_VOID, BT_CONST_PTR)
DEF_FUNCTION_TYPE_VAR_1 (BT_FN_INT_CONST_STRING_VAR,
BT_INT, BT_CONST_STRING)

View File

@ -356,7 +356,7 @@ DEF_GCC_BUILTIN(BUILT_IN_TRAP,
BT_FN_VOID)
DEF_GCC_BUILTIN(BUILT_IN_PREFETCH,
"__builtin_prefetch",
BT_FN_VOID_PTR_VAR)
BT_FN_VOID_CONST_PTR_VAR)
/* Stdio builtins. */
DEF_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR,

View File

@ -4592,7 +4592,7 @@ if (__builtin_expect (ptr != NULL, 1))
when testing pointer or floating-point values.
@end deftypefn
@deftypefn {Built-in Function} void __builtin_prefetch (void *@var{addr}, ...)
@deftypefn {Built-in Function} void __builtin_prefetch (const void *@var{addr}, ...)
This function is used to minimize cache-miss latency by moving data into
a cache before it is accessed.
You can insert calls to @code{__builtin_prefetch} into code for which

View File

@ -1,3 +1,8 @@
2002-01-28 Paul Koning <pkoning@equallogic.com>
* gcc.c-torture/execute/builtin-prefetch-1.c: Changed first
argument to __builtin_prefetch to be const ptr.
2002-01-28 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20020120-1.c: New test.

View File

@ -17,7 +17,7 @@ enum rw { read, write };
int arr[10];
void
good_const (int *p)
good_const (const int *p)
{
__builtin_prefetch (p, 0, 0);
__builtin_prefetch (p, 0, 1);
@ -30,7 +30,7 @@ good_const (int *p)
}
void
good_enum (int *p)
good_enum (const int *p)
{
__builtin_prefetch (p, read, none);
__builtin_prefetch (p, read, low);
@ -43,14 +43,14 @@ good_enum (int *p)
}
void
good_expr (int *p)
good_expr (const int *p)
{
__builtin_prefetch (p, 1 - 1, 6 - (2 * 3));
__builtin_prefetch (p, 1 + 0, 1 + 2);
}
void
good_vararg (int *p)
good_vararg (const int *p)
{
__builtin_prefetch (p, 0, 3);
__builtin_prefetch (p, 0);