Skip to content
Snippets Groups Projects
Commit 308a8297 authored by rswindells's avatar rswindells
Browse files

Update script to match cross-x86-x86.lisp.

parent 8946c553
No related branches found
No related tags found
No related merge requests found
;; Basic cross-compile script for cross-compiling from x86 to x86.
;; May require tweaking for more difficult cross-compiles.
(in-package :cl-user)
;;; Rename the X86 package and backend so that new-backend does the
;;; right thing.
(rename-package "X86" "OLD-X86")
(rename-package "X86" "OLD-X86" '("OLD-VM"))
(setf (c:backend-name c:*native-backend*) "OLD-X86")
(c::new-backend "X86"
;; Features to add here
;; Features to add here. These are just examples. You may not
;; need to list anything here. We list them here anyway as a
;; record of typical features for all x86 ports.
'(:x86 :i486 :pentium
:stack-checking :heap-overflow-check :mp :gencgc :netbsd
:conservative-float-type :linkage-table
:hash-new :random-mt19937 :modular-arith :small
:cmu :cmu18 :cmu18e :cmu19 :cmu19a
:no-pcl :no-clx :no-clm :no-hemlock
:stack-checking ; Catches stack overflow
:heap-overflow-check ; Catches heap overflows
:relative-package-names ; relative package names
:mp ; multiprocessing
:gencgc ; Generational GC
:netbsd :bsd
:conservative-float-type
:hash-new
:random-mt19937
:cmu :cmu19 :cmu19e ; Version features
:double-double ; double-double float support
)
;; Features to remove from current *features* here
'(:x86-bootstrap :alpha :osf1 :mips :ppc :sparc
;; Features to remove from current *features* here. Normally don't
;; need to list anything here unless you are trying to remove a
;; feature.
'(:x86-bootstrap
;; :alpha :osf1 :mips
:propagate-fun-type :propagate-float-type :constrain-float-type
:openbsd :freebsd :freebsd4 :glibc2 :glibc2.1 :linux
:long-float :new-random))
;(load "target:bootfiles/19c/boot-2005-11-1.lisp")
;(load "target:bootfiles/19c/boot-2005-11-2.lisp")
;;; Extern-alien-name for the new backend.
(in-package :vm)
(defun extern-alien-name (name)
(declare (type simple-string name))
name)
(export 'extern-alien-name)
(export 'fixup-code-object)
(export 'sanctify-for-execution)
;; :openbsd :freebsd :glibc2 :linux
:glibc2 :linux
:long-float :new-random :small))
;;; Compile the new backend.
(pushnew :bootstrap *features*)
......@@ -112,26 +115,40 @@
(find-symbol ,(symbol-name sym)
:vm))))
syms))))
(frob OLD-X86:BYTE-BITS OLD-X86:WORD-BITS
#+long-float OLD-X86:SIMPLE-ARRAY-LONG-FLOAT-TYPE
OLD-X86:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE
OLD-X86:SIMPLE-ARRAY-SINGLE-FLOAT-TYPE
#+long-float OLD-X86:SIMPLE-ARRAY-COMPLEX-LONG-FLOAT-TYPE
OLD-X86:SIMPLE-ARRAY-COMPLEX-DOUBLE-FLOAT-TYPE
OLD-X86:SIMPLE-ARRAY-COMPLEX-SINGLE-FLOAT-TYPE
OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-2-TYPE
OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-4-TYPE
OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-8-TYPE
OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-16-TYPE
OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-32-TYPE
OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-8-TYPE
OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-16-TYPE
OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-30-TYPE
OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-32-TYPE
OLD-X86:SIMPLE-BIT-VECTOR-TYPE
OLD-X86:SIMPLE-STRING-TYPE OLD-X86:SIMPLE-VECTOR-TYPE
OLD-X86:SIMPLE-ARRAY-TYPE OLD-X86:VECTOR-DATA-OFFSET
))
(frob OLD-VM:BYTE-BITS OLD-VM:WORD-BITS
#+long-float OLD-VM:SIMPLE-ARRAY-LONG-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-SINGLE-FLOAT-TYPE
#+long-float OLD-VM:SIMPLE-ARRAY-COMPLEX-LONG-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-COMPLEX-DOUBLE-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-COMPLEX-SINGLE-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-UNSIGNED-BYTE-2-TYPE
OLD-VM:SIMPLE-ARRAY-UNSIGNED-BYTE-4-TYPE
OLD-VM:SIMPLE-ARRAY-UNSIGNED-BYTE-8-TYPE
OLD-VM:SIMPLE-ARRAY-UNSIGNED-BYTE-16-TYPE
OLD-VM:SIMPLE-ARRAY-UNSIGNED-BYTE-32-TYPE
OLD-VM:SIMPLE-ARRAY-SIGNED-BYTE-8-TYPE
OLD-VM:SIMPLE-ARRAY-SIGNED-BYTE-16-TYPE
OLD-VM:SIMPLE-ARRAY-SIGNED-BYTE-30-TYPE
OLD-VM:SIMPLE-ARRAY-SIGNED-BYTE-32-TYPE
OLD-VM:SIMPLE-BIT-VECTOR-TYPE
OLD-VM:SIMPLE-STRING-TYPE OLD-VM:SIMPLE-VECTOR-TYPE
OLD-VM:SIMPLE-ARRAY-TYPE OLD-VM:VECTOR-DATA-OFFSET
OLD-VM:DOUBLE-FLOAT-EXPONENT-BYTE
OLD-VM:DOUBLE-FLOAT-NORMAL-EXPONENT-MAX
OLD-VM:DOUBLE-FLOAT-SIGNIFICAND-BYTE
OLD-VM:SINGLE-FLOAT-EXPONENT-BYTE
OLD-VM:SINGLE-FLOAT-NORMAL-EXPONENT-MAX
OLD-VM:SINGLE-FLOAT-SIGNIFICAND-BYTE
)
#+double-double
(frob OLD-VM:SIMPLE-ARRAY-COMPLEX-DOUBLE-DOUBLE-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-DOUBLE-DOUBLE-FLOAT-TYPE))
;; Modular arith hacks
(setf (fdefinition 'vm::ash-left-mod32) #'old-vm::ash-left-mod32)
(setf (fdefinition 'vm::lognot-mod32) #'old-vm::lognot-mod32)
;; End arith hacks
(let ((function (symbol-function 'kernel:error-number-or-lose)))
(let ((*info-environment* (c:backend-info-environment c:*target-backend*)))
......@@ -172,10 +189,9 @@
(defparameter *load-stuff* nil)
;; hack, hack, hack: Make old-x86::any-reg the same as
;; x86::any-reg as an SC. Do this by adding old-x86::any-reg
;; hack, hack, hack: Make old-vm::any-reg the same as
;; x86::any-reg as an SC. Do this by adding old-vm::any-reg
;; to the hash table with the same value as x86::any-reg.
(let ((ht (c::backend-sc-names c::*target-backend*)))
(setf (gethash 'old-x86::any-reg ht)
(gethash 'x86::any-reg ht)))
(setf (gethash 'old-vm::any-reg ht)
(gethash 'vm::any-reg ht)))
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