Skip to content

Commit

Permalink
0.9.3.7:
Browse files Browse the repository at this point in the history
	Merge "Extend address spaces on mips" (THS sbcl-devel 2005-07-15)
  • Loading branch information
csrhodes committed Jul 28, 2005
1 parent 3de8e43 commit 0256785
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 27 deletions.
2 changes: 2 additions & 0 deletions NEWS
@@ -1,5 +1,7 @@
;;;; -*- coding: utf-8; -*-
changes in sbcl-0.9.4 relative to sbcl-0.9.3:
* enhancement: SBCL on MIPS platforms now has a much larger dynamic
space for its heap. (thanks to Thiemo Seufer)
* optimizations: REMOVE-DUPLICATES now runs in linear time on
lists in some cases. This partially fixes bug 384.

Expand Down
40 changes: 26 additions & 14 deletions src/compiler/mips/insts.lisp
Expand Up @@ -58,8 +58,7 @@
(:hi-reg 64)
(:low-reg 65)
(:float-status 66)
(:ctrl-stat-reg 67)
(:r31 31)))))
(:ctrl-stat-reg 67)))))

(defparameter reg-symbols
(map 'vector
Expand Down Expand Up @@ -670,7 +669,7 @@
(immediate nil :type 'relative-label))
'(:name :tab immediate))
(:attributes branch)
(:dependencies (writes :r31))
(:dependencies (writes lip-tn))
(:delay 1)
(:emitter
(emit-relative-branch segment bcond-op 0 #b10001 target)))
Expand Down Expand Up @@ -757,7 +756,7 @@
immediate ((op bcond-op) (rt #b01000) (immediate nil :type 'relative-label))
cond-branch-printer)
(:attributes branch)
(:dependencies (reads reg) (writes :r31))
(:dependencies (reads reg) (writes lip-tn))
(:delay 1)
(:emitter
(emit-relative-branch segment bcond-op reg #b10000 target)))
Expand All @@ -769,7 +768,7 @@
cond-branch-printer)
(:attributes branch)
(:delay 1)
(:dependencies (reads reg) (writes :r31))
(:dependencies (reads reg) (writes lip-tn))
(:emitter
(emit-relative-branch segment bcond-op reg #b10001 target)))

Expand All @@ -791,28 +790,41 @@
(emit-register-inst segment special-op (reg-tn-encoding target)
0 0 0 #b001000))
(fixup
(note-fixup segment :jump target)
(emit-jump-inst segment #b000010 0)))))
(note-fixup segment :lui target)
(emit-immediate-inst segment #b001111 0 28 0)
(note-fixup segment :addi target)
(emit-immediate-inst segment #b001001 28 28 0)
(emit-register-inst segment special-op 28 0 0 0 #b001000)))))

(define-instruction jal (segment reg-or-target &optional target)
(:declare (type (or null tn fixup) target)
(type (or tn fixup (integer -16 31)) reg-or-target))
(type (or tn fixup) reg-or-target))
(:printer register ((op special-op) (rt 0) (funct #b001001)) j-printer)
(:printer jump ((op #b000011)) j-printer)
(:attributes branch)
(:dependencies (if target (writes reg-or-target) (writes :r31)))
(:dependencies (cond
(target
(writes reg-or-target) (reads target))
(t
(writes lip-tn)
(when (tn-p reg-or-target)
(reads reg-or-target)))))
(:delay 1)
(:emitter
(unless target
(setf target reg-or-target)
(setf reg-or-target 31))
(setf target reg-or-target
reg-or-target lip-tn))
(etypecase target
(tn
(emit-register-inst segment special-op (reg-tn-encoding target) 0
reg-or-target 0 #b001001))
(reg-tn-encoding reg-or-target) 0 #b001001))
(fixup
(note-fixup segment :jump target)
(emit-jump-inst segment #b000011 0)))))
(note-fixup segment :lui target)
(emit-immediate-inst segment #b001111 0 28 0)
(note-fixup segment :addi target)
(emit-immediate-inst segment #b001001 28 28 0)
(emit-register-inst segment special-op 28 0
(reg-tn-encoding reg-or-target) 0 #b001001)))))

(define-instruction bc1f (segment target)
(:declare (type label target))
Expand Down
45 changes: 34 additions & 11 deletions src/compiler/mips/parms.lisp
Expand Up @@ -57,18 +57,41 @@

;;;; Description of the target address space.

;;; Where to put the different spaces.
;;;
(def!constant read-only-space-start #x01000000)
(def!constant read-only-space-end #x05000000)

(def!constant static-space-start #x06000000)
(def!constant static-space-end #x08000000)
#!+irix
(progn
;; Where to put the different spaces.
;; Old definitions, might be still relevant for an IRIX port.
;;
(def!constant read-only-space-start #x01000000)
(def!constant read-only-space-end #x05000000)

(def!constant static-space-start #x06000000)
(def!constant static-space-end #x08000000)

(def!constant dynamic-0-space-start #x08000000)
(def!constant dynamic-0-space-end #x0c000000)
(def!constant dynamic-1-space-start #x0c000000)
(def!constant dynamic-1-space-end #x10000000))

#!+linux
(progn
;; Where to put the address spaces on Linux.
;;
;; C runtime executable segment starts at 0x00400000
(def!constant read-only-space-start #x01000000)
(def!constant read-only-space-end #x08000000)

(def!constant static-space-start #x08000000)
(def!constant static-space-end #x10000000)
;; C runtime read/write segment starts at 0x10000000, heap and DSOs
;; start at 0x2a000000
(def!constant dynamic-0-space-start #x30000000)
(def!constant dynamic-0-space-end #x50000000)
(def!constant dynamic-1-space-start #x50000000)
(def!constant dynamic-1-space-end #x70000000)
;; C stack grows downward from 0x80000000
)

(def!constant dynamic-0-space-start #x08000000)
(def!constant dynamic-0-space-end #x0c000000)
(def!constant dynamic-1-space-start #x0c000000)
(def!constant dynamic-1-space-end #x10000000)


;;;; Other non-type constants.
Expand Down
3 changes: 2 additions & 1 deletion src/compiler/mips/vm.lisp
Expand Up @@ -61,7 +61,8 @@
(defreg l1 24) ; tagged temporary 1
(defreg alloc 25) ; ALLOC pointer
;; 26 and 27 are used by the system kernel.
;; 28 is the global pointer of our C runtime.
;; 28 is the global pointer of our C runtime, and used for
;; jump/branch relaxation in Lisp.
(defreg nsp 29) ; number (native) stack pointer
;; C frame pointer, or additional saved register.
(defreg code 30) ; current function object
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.9.3.6"
"0.9.3.7"

0 comments on commit 0256785

Please sign in to comment.