Skip to content
Snippets Groups Projects
Commit 2842a6cb authored by ram's avatar ram
Browse files

Changed to use pointer< and sap+ instead of >= and + when operating on

saps.
parent f7eb1887
No related branches found
No related tags found
No related merge requests found
......@@ -190,8 +190,7 @@
(unless (or (null flag)
(and (= magic unix-OMagic) (= treloc-size 0) (= dreloc-size 0)))
(error "File ~A is not a legal Unix object file." file))
(read-symbol-table (the fixnum (+ (the fixnum sap) symstart))
symtab-size (the fixnum (+ (the fixnum sap) strstart)))
(read-symbol-table (%primitive sap+ sap symstart) symtab-size (%primitive sap+ sap strstart))
(setq load-size (logand (the fixnum (+ load-size 8192)) (lognot 8191)))
(do ((ind (truncate (+ text-size idata-size unix-header-size) 2)
(1+ ind))
......@@ -206,8 +205,8 @@
;;; link to the C routines.
(defun read-symbol-table (symstart symtab-size strstart)
(let ((end (the fixnum (+ (the fixnum symstart) (the fixnum symtab-size)))))
(do* ((se symstart (the fixnum (+ (the fixnum se) symbol-table-entry-size)))
(let ((end (%primitive sap+ symstart symtab-size)))
(do* ((se symstart (%primitive sap+ se symbol-table-entry-size))
(si (logior (ash (%primitive 16bit-system-ref se 0) 16)
(%primitive 16bit-system-ref se 1))
(logior (ash (%primitive 16bit-system-ref se 0) 16)
......@@ -218,7 +217,7 @@
(%primitive 16bit-system-ref se 5))
(logior (ash (%primitive 16bit-system-ref se 4) 16)
(%primitive 16bit-system-ref se 5))))
((>= (the fixnum se) (the fixnum end)))
((not (%primitive pointer< se end)))
(declare (fixnum st))
(when (or (= st (logior n_text n_ext))
(= st (logior n_data n_ext))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment