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

Commits:

2 changed files:

Changes:

  • src/compiler/generic/new-genesis.lisp
    ... ... @@ -2871,6 +2871,7 @@
    2871 2871
     (defparameter initial-function-entry-type-code 3863)
    
    2872 2872
     (defparameter end-entry-type-code 3840)
    
    2873 2873
     
    
    2874
    +#+nil
    
    2874 2875
     (defun write-long (num)
    
    2875 2876
       (ecase (c:backend-byte-order c:*backend*)
    
    2876 2877
         (:little-endian
    
    ... ... @@ -2880,6 +2881,15 @@
    2880 2881
          (dotimes (i 4)
    
    2881 2882
            (write-byte (ldb (byte 8 (* (- 3 i) 8)) num) *core-file*)))))
    
    2882 2883
     
    
    2884
    +(defun write-long (num)
    
    2885
    +  (ecase (c:backend-byte-order c:*backend*)
    
    2886
    +    (:little-endian
    
    2887
    +     (dotimes (i vm:word-bytes)
    
    2888
    +       (write-byte (ldb (byte 8 (* i 8)) num) *core-file*)))
    
    2889
    +    (:big-endian
    
    2890
    +     (dotimes (i vm:word-bytes)
    
    2891
    +       (write-byte (ldb (byte 8 (* (- vm:word-bytes 1 i) 8)) num) *core-file*)))))
    
    2892
    +
    
    2883 2893
     
    
    2884 2894
     (defun advance-to-page ()
    
    2885 2895
       (force-output *core-file*)
    

  • src/lisp/coreparse.c
    ... ... @@ -95,10 +95,10 @@ load_core_file(const char *file, fpu_mode_t* fpu_type)
    95 95
     {
    
    96 96
         int fd = open(file, O_RDONLY), count;
    
    97 97
     
    
    98
    -#if !(defined(alpha) || defined(__x86_64) || defined(__sparcv9))
    
    98
    +#if !(defined(alpha) || defined(__x86_64))
    
    99 99
         long header[CORE_PAGESIZE / sizeof(long)], val, len, *ptr;
    
    100 100
     #else
    
    101
    -    uint32_t header[CORE_PAGESIZE / sizeof(uint32_t)], val, len, *ptr;
    
    101
    +    u32 header[CORE_PAGESIZE / sizeof(u32)], val, len, *ptr;
    
    102 102
     #endif
    
    103 103
         lispobj initial_function = NIL;
    
    104 104
     
    
    ... ... @@ -154,10 +154,10 @@ load_core_file(const char *file, fpu_mode_t* fpu_type)
    154 154
     
    
    155 155
     	  case CORE_NDIRECTORY:
    
    156 156
     	      process_directory(fd, ptr,
    
    157
    -#if !(defined(alpha) || defined(__x86_64) || defined(__sparcv9))
    
    157
    +#if !(defined(alpha) || defined(__x86_64))
    
    158 158
     				(len - 2) / (sizeof(struct ndir_entry) / sizeof(long)));
    
    159 159
     #else
    
    160
    -				(len - 2) / (sizeof(struct ndir_entry) / sizeof(uint32_t)));
    
    160
    +				(len - 2) / (sizeof(struct ndir_entry) / sizeof(u32)));
    
    161 161
     #endif
    
    162 162
     	      break;
    
    163 163