[Git][cmucl/cmucl][sparc64-dev] Support sparc64 in load_core_file

Raymond Toy rtoy at common-lisp.net
Wed Dec 28 18:48:50 UTC 2016


Raymond Toy pushed to branch sparc64-dev at cmucl / cmucl


Commits:
6be8c6f7 by Raymond Toy at 2016-12-28T10:48:39-08:00
Support sparc64 in load_core_file

Add __sparc64v9 where __x86_64 is to get core parsing.  Basically, we
want to read 32-bit values to get the core header information. (I
think.)

- - - - -


1 changed file:

- src/lisp/coreparse.c


Changes:

=====================================
src/lisp/coreparse.c
=====================================
--- a/src/lisp/coreparse.c
+++ b/src/lisp/coreparse.c
@@ -95,10 +95,10 @@ load_core_file(const char *file, fpu_mode_t* fpu_type)
 {
     int fd = open(file, O_RDONLY), count;
 
-#if !(defined(alpha) || defined(__x86_64))
+#if !(defined(alpha) || defined(__x86_64) || defined(__sparcv9))
     long header[CORE_PAGESIZE / sizeof(long)], val, len, *ptr;
 #else
-    u32 header[CORE_PAGESIZE / sizeof(u32)], val, len, *ptr;
+    uint32_t header[CORE_PAGESIZE / sizeof(uint32_t)], val, len, *ptr;
 #endif
     lispobj initial_function = NIL;
 
@@ -154,10 +154,10 @@ load_core_file(const char *file, fpu_mode_t* fpu_type)
 
 	  case CORE_NDIRECTORY:
 	      process_directory(fd, ptr,
-#if !(defined(alpha) || defined(__x86_64))
+#if !(defined(alpha) || defined(__x86_64) || defined(__sparcv9))
 				(len - 2) / (sizeof(struct ndir_entry) / sizeof(long)));
 #else
-				(len - 2) / (sizeof(struct ndir_entry) / sizeof(u32)));
+				(len - 2) / (sizeof(struct ndir_entry) / sizeof(uint32_t)));
 #endif
 	      break;
 



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/6be8c6f7767cd79d57f0f9005b36ada8921889ae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20161228/d411e9f6/attachment-0001.html>


More information about the cmucl-cvs mailing list