From 7544d2ab5208d7df09f0f2ea9ec75bb106f56766 Mon Sep 17 00:00:00 2001
From: treep <zena.treep@gmail.com>
Date: Sat, 13 Nov 2010 10:41:04 +0300
Subject: [PATCH 2/4] move code from early-assem.lisp to the begining of assem.lisp

  Comment in build-order.lisp-expr:

    ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.

  is wrong, because at this time core.lisp don't want early-assem.lisp, so it
  can be easy moved to assem.lisp.

  This is drop out one file from the compiler and next one FIXME with it.
---
 build-order.lisp-expr         |    3 --
 src/compiler/assem.lisp       |   27 +++++++++++++++++++++
 src/compiler/early-assem.lisp |   51 -----------------------------------------
 3 files changed, 27 insertions(+), 54 deletions(-)
 delete mode 100644 src/compiler/early-assem.lisp

diff --git a/build-order.lisp-expr b/build-order.lisp-expr
index bacec9f..d867d40 100644
--- a/build-order.lisp-expr
+++ b/build-order.lisp-expr
@@ -464,9 +464,6 @@
 
  ("src/compiler/bit-util")
 
- ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.
- ("src/compiler/early-assem")
-
  ;; This has the BARRIER stuff that the threading support needs.
  ("src/code/barrier")
 
diff --git a/src/compiler/assem.lisp b/src/compiler/assem.lisp
index 5fa14f2..58b32b1 100644
--- a/src/compiler/assem.lisp
+++ b/src/compiler/assem.lisp
@@ -11,6 +11,33 @@
 
 (in-package "SB!ASSEM")
 
+;;;; constants and types for assembly
+
+;;; ASSEMBLY-UNIT-BITS -- the number of bits in the minimum assembly
+;;; unit, (also referred to as a ``byte''). Hopefully, different
+;;; instruction sets won't require changing this.
+(def!constant assembly-unit-bits 8)
+(def!constant assembly-unit-mask (1- (ash 1 assembly-unit-bits)))
+
+(def!type assembly-unit ()
+  `(unsigned-byte ,assembly-unit-bits))
+
+;;; Some functions which accept assembly units can meaningfully accept
+;;; signed values with the same number of bits and silently munge them
+;;; into appropriate unsigned values. (This is handy behavior e.g.
+;;; when assembling branch instructions on the X86.)
+(def!type possibly-signed-assembly-unit ()
+  `(or assembly-unit
+       (signed-byte ,assembly-unit-bits)))
+
+;;; the maximum alignment we can guarantee given the object format. If
+;;; the loader only loads objects 8-byte aligned, we can't do any
+;;; better then that ourselves.
+(def!constant max-alignment sb!vm:n-lowtag-bits)
+
+(def!type alignment ()
+  `(integer 0 ,max-alignment))
+
 ;;;; assembly control parameters
 
 (defvar *assem-scheduler-p* nil)
diff --git a/src/compiler/early-assem.lisp b/src/compiler/early-assem.lisp
deleted file mode 100644
index 317b100..0000000
--- a/src/compiler/early-assem.lisp
+++ /dev/null
@@ -1,51 +0,0 @@
-;;;; constants and types for assembly
-
-;;;; This software is part of the SBCL system. See the README file for
-;;;; more information.
-;;;;
-;;;; This software is derived from the CMU CL system, which was
-;;;; written at Carnegie Mellon University and released into the
-;;;; public domain. The software is in the public domain and is
-;;;; provided with absolutely no warranty. See the COPYING and CREDITS
-;;;; files for more information.
-
-(in-package "SB!ASSEM")
-
-;;; FIXME: It might make sense to use SB!VM:BYTE-FOO values here
-;;; instead of the various ASSEMBLY-UNIT-FOO things, and then define a
-;;; BYTE type. One problem: BYTE is exported from the CL package, so
-;;; ANSI says that we're not supposed to be attaching any new meanings
-;;; to it. Perhaps rename SB!VM:BYTE-FOO to SB!VM:VMBYTE-FOO or
-;;; SB!VM:VM-BYTE-FOO, and then define the SB!VM:VMBYTE or
-;;; SB!VM:VM-BYTE types?
-;;;
-;;; If this was done, some of this file could go away, and the rest
-;;; could probably be merged back into assem.lisp. (This file was
-;;; created simply in order to move the ASSEMBLY-UNIT-related
-;;; definitions before compiler/generic/core.lisp in the build
-;;; sequence.)
-
-;;; ASSEMBLY-UNIT-BITS -- the number of bits in the minimum assembly
-;;; unit, (also referred to as a ``byte''). Hopefully, different
-;;; instruction sets won't require changing this.
-(def!constant assembly-unit-bits 8)
-(def!constant assembly-unit-mask (1- (ash 1 assembly-unit-bits)))
-
-(def!type assembly-unit ()
-  `(unsigned-byte ,assembly-unit-bits))
-
-;;; Some functions which accept assembly units can meaningfully accept
-;;; signed values with the same number of bits and silently munge them
-;;; into appropriate unsigned values. (This is handy behavior e.g.
-;;; when assembling branch instructions on the X86.)
-(def!type possibly-signed-assembly-unit ()
-  `(or assembly-unit
-       (signed-byte ,assembly-unit-bits)))
-
-;;; the maximum alignment we can guarantee given the object format. If
-;;; the loader only loads objects 8-byte aligned, we can't do any
-;;; better then that ourselves.
-(def!constant max-alignment sb!vm:n-lowtag-bits)
-
-(def!type alignment ()
-  `(integer 0 ,max-alignment))
-- 
1.7.3.2

