From cfe94c2ea0a69fb7f82ab5a3e2fd9ff5443b2a81 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Sun, 23 Nov 1997 08:52:52 +0000
Subject: [PATCH] Fix the printing of context registers and the parsing of
 register names for the x86 port; the 32 bits registers have SC offsets that
 are a multiple of two.

---
 lisp/monitor.c | 6 +++++-
 lisp/parse.c   | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/monitor.c b/lisp/monitor.c
index ba7de0f10..25764e4c5 100644
--- a/lisp/monitor.c
+++ b/lisp/monitor.c
@@ -1,4 +1,4 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/monitor.c,v 1.6 1997/01/21 00:28:13 ram Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/monitor.c,v 1.7 1997/11/23 08:52:51 dtc Exp $ */
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -336,7 +336,11 @@ static void print_context(struct sigcontext *context)
 
 	for (i = 0; i < NREGS; i++) {
 		printf("%s:\t", lisp_register_names[i]);
+#ifdef i386
+		brief_print((lispobj) SC_REG(context, i*2));
+#else
 		brief_print((lispobj) SC_REG(context, i));
+#endif
 	}
 	printf("PC:\t\t  0x%08lx\n", SC_PC(context));
 }
diff --git a/lisp/parse.c b/lisp/parse.c
index f33449a6c..c46b991dd 100644
--- a/lisp/parse.c
+++ b/lisp/parse.c
@@ -1,4 +1,4 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/parse.c,v 1.3 1997/01/21 00:28:13 ram Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/parse.c,v 1.4 1997/11/23 08:52:52 dtc Exp $ */
 #include <stdio.h>
 #include <ctype.h>
 #include <signal.h>
@@ -291,7 +291,11 @@ parse_regnum(char *s)
 
 		for (i = 0; i < NREGS ; i++)
 			if (strcasecmp(s + 1, lisp_register_names[i]) == 0)
+#ifdef i386
+				return i*2;
+#else
 				return i;
+#endif
 		
 		return -1;
 	}
-- 
GitLab