/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.18 1990/11/30 02:45:43 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.19 1990/12/01 00:22:03 cph Rel $
Copyright (c) 1989, 1990 Massachusetts Institute of Technology
*/
#include "hppacache.h"
+#include "option.h"
static struct pdc_cache_dump cache_info;
flush_i_cache ()
{
extern void cache_flush_all ();
-
- cache_flush_all ((D_CACHE | I_CACHE),
- &cache_info.cache_format);
- return;
+ /* Newer machines can interrupt this call, so do it twice.
+ Probability of two interrupts in the same cache line is
+ exceedingly small, so this is likely to win. */
+ cache_flush_all ((D_CACHE | I_CACHE), (& (cache_info . cache_format)));
+ cache_flush_all ((D_CACHE | I_CACHE), (& (cache_info . cache_format)));
}
-int
+#ifndef MODELS_FILENAME
+#define MODELS_FILENAME "HPPAmodels"
+#endif
+
+void
flush_i_cache_initialize ()
{
- int fd, read_result;
struct utsname sysinfo;
- char filename[MAXPATHLEN];
-
+ CONST char * models_filename =
+ (search_path_for_file (0, MODELS_FILENAME, 1));
if ((uname (&sysinfo)) < 0)
+ {
+ fprintf (stderr, "\nflush_i_cache: uname failed.\n");
+ goto loser;
+ }
{
- fprintf (stderr, "\nflush_i_cache: uname failed.\n");
- return (-1);
+ int fd = (open (models_filename, O_RDONLY));
+ if (fd < 0)
+ {
+ fprintf (stderr, "\nflush_i_cache: open (%s) failed.\n",
+ models_filename);
+ goto loser;
+ }
+ while (1)
+ {
+ int read_result =
+ (read (fd,
+ ((char *) (&cache_info)),
+ (sizeof (struct pdc_cache_dump))));
+ if (read_result == 0)
+ {
+ close (fd);
+ break;
+ }
+ if (read_result != (sizeof (struct pdc_cache_dump)))
+ {
+ close (fd);
+ fprintf (stderr, "\nflush_i_cache: read (%s) failed.\n",
+ models_filename);
+ goto loser;
+ }
+ if ((strcmp ((sysinfo . machine), (cache_info . hardware))) == 0)
+ {
+ close (fd);
+ return;
+ }
+ }
}
-
- sprintf (&filename[0],
- CACHE_FILENAME,
- CACHE_FILENAME_PATH,
- sysinfo.nodename,
- sysinfo.machine);
-
- fd = (open ((&filename[0]), O_RDONLY));
- if (fd < 0)
- {
- fprintf (stderr, "\nflush_i_cache: open (%s) failed.\n",
- (&filename[0]));
- return (-1);
- }
-
- read_result = (read (fd,
- ((char *) (&cache_info)),
- (sizeof (struct pdc_cache_dump))));
- close (fd);
-
- if (read_result != (sizeof (struct pdc_cache_dump)))
- {
- fprintf (stderr, "\nflush_i_cache: read (%s) failed.\n",
- (&filename[0]));
- return (-1);
- }
-
- if ((strcmp (sysinfo.machine, cache_info.hardware)) != 0)
- {
- fprintf (stderr,
- "\nflush_i_cache: information in %s does not match hardware.\n",
- (&filename[0]));
- return (-1);
- }
- return (0);
+ fprintf (stderr,
+ "The cache parameters database has no entry for the %s model.\n",
+ (sysinfo . machine));
+ fprintf (stderr, "Please make an entry in the database;\n");
+ fprintf (stderr, "the installation notes contain instructions for doing so.\n");
+ loser:
+ fprintf (stderr, "\nASM_RESET_HOOK: Unable to read cache parameters.\n");
+ termination_init_error ();
}
#endif /* IN_CMPINT_C */
processor might have old copies of.
*/
-#define FLUSH_I_CACHE() \
-do { \
+#define FLUSH_I_CACHE() do \
+{ \
extern void flush_i_cache (); \
\
flush_i_cache (); \
Not needed during GC because FLUSH_I_CACHE will be used.
*/
-#define FLUSH_I_CACHE_REGION(address, nwords) \
-do { \
+#define FLUSH_I_CACHE_REGION(address, nwords) do \
+{ \
extern void cache_flush_region (); \
\
cache_flush_region (((void *) (address)), nwords); \
/* This loads the cache information structure for use by flush_i_cache.
*/
-#define ASM_RESET_HOOK() \
-do { \
- if ((flush_i_cache_initialize ()) < 0) \
- { \
- fprintf (stderr, \
- "\nASM_RESET_HOOK: Unable to read cache parameters.\n"); \
- Microcode_Termination (TERM_COMPILER_DEATH); \
- } \
-} while (0)
+#define ASM_RESET_HOOK() flush_i_cache_initialize ()
\f
/* Derived parameters and macros.
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/hppacach.c,v 1.1 1990/08/08 20:21:12 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/hppacach.c,v 1.2 1990/12/01 00:21:19 cph Rel $
Copyright (c) 1990 Massachusetts Institute of Technology
#include <stdio.h>
#include <math.h>
-
#include <sys/stat.h>
#include <memory.h>
-
#include <nlist.h>
#include "hppacache.h"
#else
-#define DEBUGGING(stmt) \
-do { \
-}while (0)
+#define DEBUGGING(stmt) do \
+{ \
+} while (0)
#endif
\f
#define UTSNAME_SYMBOL "utsname"
#define PDC_CACHE_SYMBOL "cache_tlb_parms"
-/* File where cached locations (to avoid nlist search) live */
-
-#define LOCATIONS_CACHE_FILE "/tmp/hppa.cache"
-
-/* Operating system name */
-
-#define SYSNAME "HP-UX"
-
static struct utsname sysinfo;
static char **the_argv;
-\f
+
void
-io_error (format, fname)
- char *format, *fname;
+io_error (pname, format, fname)
+ char * pname;
+ char * format;
+ char * fname;
{
char errmsg[MAXPATHLEN + 257];
char errstring[MAXPATHLEN + 257];
sprintf (&errmsg[0], format, fname);
- sprintf (&errstring[0], "%s: %s", (the_argv[0]), (&errmsg[0]));
+ sprintf (&errstring[0], "%s: %s: %s", (the_argv[0]), pname, (&errmsg[0]));
perror (&errstring[0]);
- return;
}
void
-io_lose (format, fname)
- char *format, *fname;
+io_lose (pname, format, fname)
+ char * pname;
+ char * format;
+ char * fname;
{
- io_error (format, fname);
+ io_error (pname, format, fname);
exit (1);
}
-
+\f
struct kernel_locations
{
long utsname_location;
{ 0 },
};
-int
+void
read_nlist (kloc)
struct kernel_locations *kloc;
{
DEBUGGING (printf ("reading nlist...\n"));
if ((nlist (KERNEL_FILE, nl)) != 0)
- {
- io_error ("nlist: failed on %s", KERNEL_FILE);
- return (-1);
- }
+ io_lose ("read_nlist", "failed on %s", KERNEL_FILE);
DEBUGGING (printf ("reading nlist done.\n"));
DEBUGGING (printf ("utsname location = 0x%x\n", kloc->utsname_location));
DEBUGGING (printf ("pdc_cache location = 0x%x\n", kloc->pdc_cache_location));
-
- return (0);
}
-\f
-void
-read_model (pdc_cache)
- struct pdc_cache_dump *pdc_cache;
-{
- int fd, read_result;
- static char filename[MAXPATHLEN + 1];
-
- sprintf ((&filename[0]),
- MODELS_FILENAME,
- CACHE_FILENAME_PATH);
- fprintf (stderr, "%s:\n", (the_argv[0]));
- fprintf (stderr,
- "\tReading cache information from the model-based database (%s).\n",
- (&filename[0]));
- fd = (open ((&filename[0]), O_RDONLY));
- if (fd < 0)
- {
- io_lose ("read_model: open (%s) failed", (&filename[0]));
- }
- while (true)
- {
- read_result = (read (fd, ((char *) pdc_cache), (sizeof (struct pdc_cache_dump))));
- if (read_result != (sizeof (struct pdc_cache_dump)))
- {
- break;
- }
- if ((strcmp (sysinfo.machine, pdc_cache->hardware)) == 0)
- {
- close (fd);
- fprintf (stderr,
- "\tFound information for model %s in %s.\n",
- sysinfo.machine, (&filename[0]));
- return;
- }
- }
- close (fd);
- fprintf (stderr,
- "\tCould not find information for model %s in %s.\n",
- sysinfo.machine, (&filename[0]));
- exit (1);
-}
-\f
void
read_parameters (pdc_cache)
struct pdc_cache_dump *pdc_cache;
{
- int kmem;
-
struct kernel_locations kloc;
struct utsname kerninfo;
-
- if ((read_nlist (&kloc)) < 0)
- {
- read_model (pdc_cache);
- return;
- }
- kmem = (open (KERNEL_MEMORY_FILE, O_RDONLY));
+ int kmem = (open (KERNEL_MEMORY_FILE, O_RDONLY));
if (kmem < 0)
- {
- io_error ("read_parameters: open (%s) failed", KERNEL_MEMORY_FILE);
- read_model (pdc_cache);
- return;
- }
- else
- {
- if ((lseek (kmem, kloc.utsname_location, 0)) < 0)
- {
- io_lose ("read_parameters: lseek (%s) failed", KERNEL_MEMORY_FILE);
- }
-
- if ((read (kmem, &kerninfo, (sizeof (kerninfo)))) !=
- (sizeof (kerninfo)))
- {
- io_lose ("read_parameters: read (%s) failed", KERNEL_MEMORY_FILE);
- }
-
- if ((memcmp (&kerninfo, &sysinfo, (sizeof (sysinfo)))) != 0)
- {
- fprintf (stderr, "read_parameters: uname and %s in %s differ.\n",
- kloc.utsname_location, KERNEL_MEMORY_FILE);
- }
-
- strncpy (pdc_cache->hardware, (kerninfo.machine),
- (sizeof (kerninfo.machine)));
-
- if ((lseek (kmem, (kloc.pdc_cache_location), 0)) < 0)
- {
- io_lose ("read_parameters: lseek (%s) failed", KERNEL_MEMORY_FILE);
- }
-
- if ((read (kmem, pdc_cache->cache_format,
- (sizeof (pdc_cache->cache_format)))) !=
- (sizeof (pdc_cache->cache_format)))
- {
- io_lose ("read_parameters: read (%s) failed", KERNEL_MEMORY_FILE);
- }
-
- if ((close (kmem)) < 0)
- {
- io_lose ("read_parameters: close (%s) failed", KERNEL_MEMORY_FILE);
- }
- }
- return;
+ io_lose ("read_parameters", "open (%s) failed", KERNEL_MEMORY_FILE);
+ read_nlist (&kloc);
+ if ((lseek (kmem, kloc.utsname_location, 0)) < 0)
+ io_lose ("read_parameters", "lseek (%s) failed", KERNEL_MEMORY_FILE);
+ if ((read (kmem, (&kerninfo), (sizeof (kerninfo)))) !=
+ (sizeof (kerninfo)))
+ io_lose ("read_parameters", "read (%s) failed", KERNEL_MEMORY_FILE);
+ if ((memcmp ((&kerninfo), (&sysinfo), (sizeof (sysinfo)))) != 0)
+ fprintf (stderr, "read_parameters: uname and %s in %s differ.\n",
+ kloc.utsname_location, KERNEL_MEMORY_FILE);
+ strncpy (pdc_cache->hardware, (kerninfo.machine),
+ (sizeof (kerninfo.machine)));
+ if ((lseek (kmem, (kloc.pdc_cache_location), 0)) < 0)
+ io_lose ("read_parameters", "lseek (%s) failed", KERNEL_MEMORY_FILE);
+ if ((read (kmem, pdc_cache->cache_format,
+ (sizeof (pdc_cache->cache_format)))) !=
+ (sizeof (pdc_cache->cache_format)))
+ io_lose ("read_parameters", "read (%s) failed", KERNEL_MEMORY_FILE);
+ if ((close (kmem)) < 0)
+ io_lose ("read_parameters", "close (%s) failed", KERNEL_MEMORY_FILE);
}
\f
void
return;
}
\f
-static char dumpname[MAXPATHLEN + 1];
+int
+search_pdc_database (fd, pdc_cache, filename)
+ int fd;
+ struct pdc_cache_dump * pdc_cache;
+ char * filename;
+{
+ while (1)
+ {
+ int scr =
+ (read (fd, ((char *) pdc_cache), (sizeof (struct pdc_cache_dump))));
+ if (scr < 0)
+ io_lose ("update_pdc_database", "read (%s) failed", filename);
+ if (scr != (sizeof (struct pdc_cache_dump)))
+ {
+ if (scr == 0)
+ return (0);
+ fprintf (stderr, "%s: %s: incomplete read (%s)\n",
+ (the_argv[0]), "update_pdc_database", filename);
+ fflush (stderr);
+ exit (1);
+ }
+ if ((strcmp ((sysinfo . machine), (pdc_cache -> hardware))) == 0)
+ return (1);
+ }
+}
void
-dump_parameters (pdc_cache)
- struct pdc_cache_dump *pdc_cache;
+update_pdc_database (pdc_cache, filename)
+ struct pdc_cache_dump * pdc_cache;
+ char * filename;
{
- int file;
-
- sprintf (&dumpname[0],
- CACHE_FILENAME,
- CACHE_FILENAME_PATH,
- sysinfo.nodename,
- sysinfo.machine);
-
- file = open (&dumpname[0], (O_WRONLY | O_CREAT | O_TRUNC), 0664);
- if (file < 0)
- {
- io_lose ("dump_parameters: open (%s) failed", dumpname);
- }
- if ((write (file, pdc_cache, (sizeof (struct pdc_cache_dump)))) !=
- (sizeof (struct pdc_cache_dump)))
- {
- io_lose ("dump_parameters: write (%s) failed", dumpname);
- }
- if ((close (file)) != 0)
- {
- io_lose ("dump_parameters: close (%s) failed", dumpname);
- }
- return;
+ int fd = (open (filename, (O_RDWR | O_CREAT), 0666));
+ if (fd < 0)
+ io_lose ("update_pdc_database", "open (%s) failed", filename);
+ if (! (search_pdc_database (fd, pdc_cache, filename)))
+ {
+ read_parameters (pdc_cache);
+ {
+ int scr =
+ (write (fd, ((char *) pdc_cache), (sizeof (struct pdc_cache_dump))));
+ if (scr < 0)
+ io_lose ("update_pdc_database", "write (%s) failed", filename);
+ if (scr != (sizeof (struct pdc_cache_dump)))
+ {
+ fprintf (stderr, "%s: %s: incomplete write (%s)\n",
+ (the_argv[0]), "update_pdc_database", filename);
+ fflush (stderr);
+ exit (1);
+ }
+ }
+ }
+ if ((close (fd)) < 0)
+ io_lose ("update_pdc_database", "close (%s) failed", filename);
}
void
-read_stored_parameters (old_pdc_cache)
- struct pdc_cache_dump *old_pdc_cache;
+read_stored_parameters (pdc_cache, filename)
+ struct pdc_cache_dump * pdc_cache;
+ char * filename;
{
- int file;
-
- sprintf (&dumpname[0],
- CACHE_FILENAME,
- CACHE_FILENAME_PATH,
- sysinfo.nodename,
- sysinfo.machine);
-
- file = open (&dumpname[0], (O_RDONLY), 0);
- if (file < 0)
- {
- io_lose ("read_stored_parameters: open (%s) failed", dumpname);
- }
- if ((read (file, old_pdc_cache, (sizeof (struct pdc_cache_dump)))) !=
- (sizeof (struct pdc_cache_dump)))
- {
- io_lose ("read_stored_parameters: read (%s) failed", dumpname);
- }
- if ((close (file)) != 0)
- {
- io_lose ("read_stored_parameters: close (%s) failed", dumpname);
- }
- return;
+ int fd = (open (filename, (O_RDONLY), 0));
+ if (fd < 0)
+ io_lose ("read_stored_parameters", "open (%s) failed", filename);
+ if (! (search_pdc_database (fd, pdc_cache, filename)))
+ {
+ fprintf (stderr, "%s: %s: unable to find entry in models database\n",
+ (the_argv[0]), "read_stored_parameters");
+ fflush (stderr);
+ exit (1);
+ }
+ if ((close (fd)) < 0)
+ io_lose ("read_stored_parameters", "close (%s) failed", filename);
}
void
return;
}
\f
+void
+usage ()
+{
+ fprintf (stderr, "usage: one of:\n");
+ fprintf (stderr, " %s -update FILENAME\n");
+ fprintf (stderr, " %s -print FILENAME\n");
+ fprintf (stderr, " %s -verify FILENAME\n");
+ fflush (stderr);
+ exit (1);
+}
+
+void
main (argc, argv)
int argc;
char **argv;
{
- int
- count,
- uname_result;
- struct pdc_cache_dump
- new_pdc_cache_s, old_pdc_cache_s,
- *new_pdc_cache, *old_pdc_cache;
-
the_argv = argv;
- new_pdc_cache = ((struct pdc_cache_dump *) NULL);
- old_pdc_cache = ((struct pdc_cache_dump *) NULL);
-
- uname_result = (uname (&sysinfo));
- if (uname_result < 0)
- {
- fprintf (stderr, "%s: uname failed.\n", argv[0]);
- exit (1);
- }
-
- if (argc <= 1)
- {
- if (new_pdc_cache == ((struct pdc_cache_dump *) NULL))
- {
- read_parameters (&new_pdc_cache_s);
- new_pdc_cache = &new_pdc_cache_s;
- }
- dump_parameters (new_pdc_cache);
- }
- else
+ if ((uname (&sysinfo)) < 0)
+ io_lose ("main", "uname failed", 0);
+ if (argc != 3)
+ usage ();
{
- for (count = 1; count < argc; count++)
- {
- if ((strcmp ((argv[count]), "-printnew")) == 0)
+ char * keyword = (argv[1]);
+ char * filename = (argv[2]);
+ if ((strcmp (keyword, "-update")) == 0)
{
- if (new_pdc_cache == ((struct pdc_cache_dump *) NULL))
- {
- read_parameters (&new_pdc_cache_s);
- new_pdc_cache = &new_pdc_cache_s;
- }
- print_parameters (new_pdc_cache);
+ struct pdc_cache_dump pdc_cache;
+ update_pdc_database ((&pdc_cache), filename);
}
- else if ((strcmp ((argv[count]), "-printold")) == 0)
+ else if ((strcmp (keyword, "-print")) == 0)
{
- if (old_pdc_cache == ((struct pdc_cache_dump *) NULL))
- {
- read_stored_parameters (&old_pdc_cache_s);
- old_pdc_cache = &old_pdc_cache_s;
- }
- print_parameters (old_pdc_cache);
+ struct pdc_cache_dump pdc_cache;
+ update_pdc_database ((&pdc_cache), filename);
+ print_parameters (&pdc_cache);
}
- else if ((strcmp ((argv[count]), "-dump")) == 0)
+ else if ((strcmp (keyword, "-verify")) == 0)
{
- if (new_pdc_cache == ((struct pdc_cache_dump *) NULL))
- {
- read_parameters (&new_pdc_cache_s);
- new_pdc_cache = &new_pdc_cache_s;
- }
- dump_parameters (new_pdc_cache);
+ struct pdc_cache_dump old_pdc_cache;
+ struct pdc_cache_dump new_pdc_cache;
+ read_stored_parameters ((&old_pdc_cache), filename);
+ read_parameters (&new_pdc_cache);
+ verify_parameters ((&new_pdc_cache), (&old_pdc_cache));
}
- else if ((strcmp ((argv[count]), "-verify")) == 0)
- {
- if (new_pdc_cache == ((struct pdc_cache_dump *) NULL))
- {
- read_parameters (&new_pdc_cache_s);
- new_pdc_cache = &new_pdc_cache_s;
- }
- if (old_pdc_cache == ((struct pdc_cache_dump *) NULL))
- {
- read_stored_parameters (&old_pdc_cache_s);
- old_pdc_cache = &old_pdc_cache_s;
- }
- verify_parameters (new_pdc_cache, old_pdc_cache);
- }
- else
- {
- fprintf (stderr, "usage: %s [-dump] [-verify] [-printnew] [-printold]\n",
- argv[0]);
- exit (1);
- }
- }
+ else
+ usage ();
}
exit (0);
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.18 1990/11/30 02:45:43 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.19 1990/12/01 00:22:03 cph Rel $
Copyright (c) 1989, 1990 Massachusetts Institute of Technology
*/
#include "hppacache.h"
+#include "option.h"
static struct pdc_cache_dump cache_info;
flush_i_cache ()
{
extern void cache_flush_all ();
-
- cache_flush_all ((D_CACHE | I_CACHE),
- &cache_info.cache_format);
- return;
+ /* Newer machines can interrupt this call, so do it twice.
+ Probability of two interrupts in the same cache line is
+ exceedingly small, so this is likely to win. */
+ cache_flush_all ((D_CACHE | I_CACHE), (& (cache_info . cache_format)));
+ cache_flush_all ((D_CACHE | I_CACHE), (& (cache_info . cache_format)));
}
-int
+#ifndef MODELS_FILENAME
+#define MODELS_FILENAME "HPPAmodels"
+#endif
+
+void
flush_i_cache_initialize ()
{
- int fd, read_result;
struct utsname sysinfo;
- char filename[MAXPATHLEN];
-
+ CONST char * models_filename =
+ (search_path_for_file (0, MODELS_FILENAME, 1));
if ((uname (&sysinfo)) < 0)
+ {
+ fprintf (stderr, "\nflush_i_cache: uname failed.\n");
+ goto loser;
+ }
{
- fprintf (stderr, "\nflush_i_cache: uname failed.\n");
- return (-1);
+ int fd = (open (models_filename, O_RDONLY));
+ if (fd < 0)
+ {
+ fprintf (stderr, "\nflush_i_cache: open (%s) failed.\n",
+ models_filename);
+ goto loser;
+ }
+ while (1)
+ {
+ int read_result =
+ (read (fd,
+ ((char *) (&cache_info)),
+ (sizeof (struct pdc_cache_dump))));
+ if (read_result == 0)
+ {
+ close (fd);
+ break;
+ }
+ if (read_result != (sizeof (struct pdc_cache_dump)))
+ {
+ close (fd);
+ fprintf (stderr, "\nflush_i_cache: read (%s) failed.\n",
+ models_filename);
+ goto loser;
+ }
+ if ((strcmp ((sysinfo . machine), (cache_info . hardware))) == 0)
+ {
+ close (fd);
+ return;
+ }
+ }
}
-
- sprintf (&filename[0],
- CACHE_FILENAME,
- CACHE_FILENAME_PATH,
- sysinfo.nodename,
- sysinfo.machine);
-
- fd = (open ((&filename[0]), O_RDONLY));
- if (fd < 0)
- {
- fprintf (stderr, "\nflush_i_cache: open (%s) failed.\n",
- (&filename[0]));
- return (-1);
- }
-
- read_result = (read (fd,
- ((char *) (&cache_info)),
- (sizeof (struct pdc_cache_dump))));
- close (fd);
-
- if (read_result != (sizeof (struct pdc_cache_dump)))
- {
- fprintf (stderr, "\nflush_i_cache: read (%s) failed.\n",
- (&filename[0]));
- return (-1);
- }
-
- if ((strcmp (sysinfo.machine, cache_info.hardware)) != 0)
- {
- fprintf (stderr,
- "\nflush_i_cache: information in %s does not match hardware.\n",
- (&filename[0]));
- return (-1);
- }
- return (0);
+ fprintf (stderr,
+ "The cache parameters database has no entry for the %s model.\n",
+ (sysinfo . machine));
+ fprintf (stderr, "Please make an entry in the database;\n");
+ fprintf (stderr, "the installation notes contain instructions for doing so.\n");
+ loser:
+ fprintf (stderr, "\nASM_RESET_HOOK: Unable to read cache parameters.\n");
+ termination_init_error ();
}
#endif /* IN_CMPINT_C */
processor might have old copies of.
*/
-#define FLUSH_I_CACHE() \
-do { \
+#define FLUSH_I_CACHE() do \
+{ \
extern void flush_i_cache (); \
\
flush_i_cache (); \
Not needed during GC because FLUSH_I_CACHE will be used.
*/
-#define FLUSH_I_CACHE_REGION(address, nwords) \
-do { \
+#define FLUSH_I_CACHE_REGION(address, nwords) do \
+{ \
extern void cache_flush_region (); \
\
cache_flush_region (((void *) (address)), nwords); \
/* This loads the cache information structure for use by flush_i_cache.
*/
-#define ASM_RESET_HOOK() \
-do { \
- if ((flush_i_cache_initialize ()) < 0) \
- { \
- fprintf (stderr, \
- "\nASM_RESET_HOOK: Unable to read cache parameters.\n"); \
- Microcode_Termination (TERM_COMPILER_DEATH); \
- } \
-} while (0)
+#define ASM_RESET_HOOK() flush_i_cache_initialize ()
\f
/* Derived parameters and macros.