From 11f55a9c882afa9891ed594eb17c630c070a3496 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Mon, 5 Mar 1990 21:06:44 +0000
Subject: [PATCH] Added instructions for LOAD-ASSEMBLY-ADDRESS and
 LOAD-ASSEMBLY-VALUE.  Just like the foreign ones, except use a :assembly
 fixup.

---
 compiler/mips/insts.lisp | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/compiler/mips/insts.lisp b/compiler/mips/insts.lisp
index 444bc2b90..4233114e8 100644
--- a/compiler/mips/insts.lisp
+++ b/compiler/mips/insts.lisp
@@ -7,7 +7,7 @@
 ;;; contact Scott Fahlman (Scott.Fahlman@CS.CMU.EDU).
 ;;; **********************************************************************
 ;;;
-;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/insts.lisp,v 1.10 1990/02/26 23:45:28 wlott Exp $
+;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/insts.lisp,v 1.11 1990/03/05 21:06:44 wlott Exp $
 ;;; 
 ;;; Assembler instruction definitions for the MIPS R2000.
 ;;;
@@ -444,6 +444,34 @@
 
 
 
+;;; LOAD-ASSEMBLY-ADDRESS and LOAD-ASSEMBLY-VALUE
+;;; 
+;;; This ``instruction'' emits a LUI followed by either an ADDIU, LW, or SW.
+;;; The difference is that we use :assembly fixups.
+;;;
+(def-instruction-format (load-assembly-format 8) (rt symbol)
+  ;; We need to switch the order of the two instructions because the MIPS
+  ;; is little-endian.
+  (op2 :unsigned 6 :instruction-constant)
+  (rt :unsigned 5 :register)
+  (rt :unsigned 5 :register)
+  (filler :unsigned 16 :constant 0)
+  (op1 :unsigned 6 :constant #b001111)
+  (rt :unsigned 5 :register)
+  (rt :unsigned 5 :register)
+  (symbol :unsigned 16 :fixup :assembly))
+
+(def-instruction load-assembly-address load-assembly-format
+  :op2 #b001001)
+
+(def-instruction load-assembly-value load-assembly-format
+  :op2 #b100011)
+
+(def-instruction store-assembly-value load-assembly-format
+  :op2 #b101011)
+
+
+
 ;;; BYTE, SHORT, and WORD instructions.
 ;;;
 ;;; These instructions emit a byte, short, or word in the instruction
-- 
GitLab