9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Two patches for 8l
@ 2003-12-18 15:47 Latchesar Ionkov
  0 siblings, 0 replies; only message in thread
From: Latchesar Ionkov @ 2003-12-18 15:47 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

Hi,

The first patch (add-8l.diff) fixes the ADDL $-1 --> DECL bug.

The second one (fucom-8l.diff) fixes bugs in FUCOM* instructions -- I guess
nobody used them before.

The patches are created using diff -u in Linux. Let me know if you prefer
another diff format.

Thanks,
	Lucho

[-- Attachment #2: add-8l.diff --]
[-- Type: text/plain, Size: 2002 bytes --]

diff -ubr 8l.orig/obj.c 8l/obj.c
--- 8l.orig/obj.c	2003-02-17 12:45:48.000000000 -0500
+++ 8l/obj.c	2003-12-18 10:35:16.000000000 -0500
@@ -984,22 +984,6 @@
 		}
 		goto casdef;

-	case AADDL:
-		if(p->from.type == D_CONST)
-		if(p->from.offset < 0) {
-			p->as = ASUBL;
-			p->from.offset = -p->from.offset;
-		}
-		goto casdef;
-
-	case ASUBL:
-		if(p->from.type == D_CONST)
-		if(p->from.offset < 0) {
-			p->as = AADDL;
-			p->from.offset = -p->from.offset;
-		}
-		goto casdef;
-
 	casdef:
 	default:
 		if(skip)
diff -ubr 8l.orig/optab.c 8l/optab.c
--- 8l.orig/optab.c	2002-03-23 21:47:12.000000000 -0500
+++ 8l/optab.c	2003-12-18 10:35:15.000000000 -0500
@@ -38,8 +38,6 @@
 };
 uchar	yaddl[] =
 {
-	Yi1,	Yrl,	Z_rp,	1,
-	Yi1,	Yml,	Zo_m,	2,
 	Yi8,	Yml,	Zibo_m,	2,
 	Yi32,	Yax,	Zil_,	1,
 	Yi32,	Yml,	Zilo_m,	2,
@@ -321,8 +319,8 @@
 	{ AADCL,	yxorl,	Px, 0x83,(02),0x15,0x81,(02),0x11,0x13 },
 	{ AADCW,	yxorl,	Pe, 0x83,(02),0x15,0x81,(02),0x11,0x13 },
 	{ AADDB,	yxorb,	Px, 0x04,0x80,(00),0x00,0x02 },
-	{ AADDL,	yaddl,	Px, 0x40,0xff,(00),0x83,(00),0x05,0x81,(00),0x01,0x03 },
-	{ AADDW,	yaddl,	Pe, 0x40,0xff,(00),0x83,(00),0x05,0x81,(00),0x01,0x03 },
+	{ AADDL,	yaddl,	Px, 0x83,(00),0x05,0x81,(00),0x01,0x03 },
+	{ AADDW,	yaddl,	Pe, 0x83,(00),0x05,0x81,(00),0x01,0x03 },
 	{ AADJSP },
 	{ AANDB,	yxorb,	Pb, 0x24,0x80,(04),0x20,0x22 },
 	{ AANDL,	yxorl,	Px, 0x83,(04),0x25,0x81,(04),0x21,0x23 },
@@ -526,8 +524,8 @@
 	{ ASTOSL,	ynone,	Px, 0xab },
 	{ ASTOSW,	ynone,	Pe, 0xab },
 	{ ASUBB,	yxorb,	Pb, 0x2c,0x80,(05),0x28,0x2a },
-	{ ASUBL,	yaddl,	Px, 0x48,0xff,(01),0x83,(05),0x2d,0x81,(05),0x29,0x2b },
-	{ ASUBW,	yaddl,	Pe, 0x48,0xff,(01),0x83,(05),0x2d,0x81,(05),0x29,0x2b },
+	{ ASUBL,	yaddl,	Px, 0x83,(05),0x2d,0x81,(05),0x29,0x2b },
+	{ ASUBW,	yaddl,	Pe, 0x83,(05),0x2d,0x81,(05),0x29,0x2b },
 	{ ASYSCALL,	ynone,	Px, 0xcd,100 },
 	{ ATESTB,	ytestb,	Pb, 0xa8,0xf6,(00),0x84,0x84 },
 	{ ATESTL,	ytestl,	Px, 0xa9,0xf7,(00),0x85,0x85 },

[-- Attachment #3: fucom-8l.diff --]
[-- Type: text/plain, Size: 554 bytes --]

diff -ubr 8l.orig/optab.c 8l/optab.c
--- 8l.orig/optab.c	2002-03-23 21:47:12.000000000 -0500
+++ 8l/optab.c	2003-12-18 10:36:41.000000000 -0500
@@ -572,9 +572,9 @@
 	{ AFCOMW,	yfmvx,	Px, 0xde,(02) },
 	{ AFCOMWP,	yfmvx,	Px, 0xde,(03) },

-	{ AFUCOM,	yfmvx,	Px, 0xdd,(04) },
-	{ AFUCOMP,	yfmvx,	Px, 0xdd,(05) },
-	{ AFUCOMPP,	yfmvx,	Px, 0xda,(05) },
+	{ AFUCOM,	ycompp,	Px, 0xdd,(04) },
+	{ AFUCOMP,	ycompp, Px, 0xdd,(05) },
+	{ AFUCOMPP,	ycompp,	Px, 0xda,(13) },

 	{ AFADDDP,	yfaddp,	Px, 0xde,(00) },
 	{ AFADDW,	yfmvx,	Px, 0xde,(00) },

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-18 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-18 15:47 [9fans] Two patches for 8l Latchesar Ionkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).