From mboxrd@z Thu Jan 1 00:00:00 1970 From: Latchesar Ionkov To: 9fans@cse.psu.edu Message-ID: <20031218154723.GA12304@ionkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [9fans] Two patches for 8l Date: Thu, 18 Dec 2003 10:47:23 -0500 Topicbox-Message-UUID: a9a77942-eacc-11e9-9e20-41e7f4b1d025 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="add-8l.diff" 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 }, --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fucom-8l.diff" 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) }, --ZPt4rx8FFjLCG7dd--