OSDN Git Service

* builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jan 2002 20:07:01 +0000 (20:07 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jan 2002 20:07:01 +0000 (20:07 +0000)
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49296 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtin-types.def
gcc/builtins.def
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c

index b92dcd8..243c247 100644 (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>
 
index f24f5c7..6cefb32 100644 (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)
 
index 7b58bef..c6f6dc4 100644 (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,
index 4840833..ad88a2a 100644 (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
index 6500056..28a931b 100644 (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.
index d6b7b59..4ee05a9 100644 (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);