1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-27 04:12:51 +00:00

Remove support for the Sun386i. (#329)

This was a machine running SunOS 4, which we no longer support.

It had an odd display controller and a compiler with issues that
required workarounds. Those compiler issues aren't an issue in
today's world, so we don't need to keep the workarounds present
for reference.

It had a bit of inline assembly, but that is still present in
other files for other platforms.
This commit is contained in:
Bruce Mitchener
2021-01-31 11:02:40 +07:00
committed by GitHub
parent 1f17665741
commit 70db63449c
12 changed files with 3 additions and 371 deletions

View File

@@ -1268,19 +1268,6 @@ LispPTR bltchar(LispPTR *args)
DestPixRect->pr_width = destbpl = abs(pbt->pbtdestbpl);
SrcePixRect->pr_height = DestPixRect->pr_height = pbt->pbtheight;
#ifdef I386
/* Need to take care of byte order, because display bank */
/* on the 386 is NOT bit reversed.... */
if (IN_DISPLAY_BANK(pbt->pbtsourcehi))
mpr_d(SrcePixRect)->md_flags |= MP_I386;
else
mpr_d(SrcePixRect)->md_flags &= (~MP_I386);
if (IN_DISPLAY_BANK(pbt->pbtdesthi))
mpr_d(DestPixRect)->md_flags |= MP_I386;
else
mpr_d(DestPixRect)->md_flags &= (~MP_I386);
#endif /* I386 */
mpr_mdlinebytes(DestPixRect) = (destbpl + 7) >> 3;
mpr_mdlinebytes(SrcePixRect) = (srcebpl + 7) >> 3;
@@ -2096,19 +2083,6 @@ void tedit_bltchar(LispPTR *args)
DestPixRect->pr_width = destbpl = abs(pbt->pbtdestbpl);
SrcePixRect->pr_height = DestPixRect->pr_height = pbt->pbtheight;
#ifdef I386
/* Need to take care of byte order, because display bank */
/* on the 386 is NOT bit reversed.... */
if (IN_DISPLAY_BANK(pbt->pbtsourcehi))
mpr_d(SrcePixRect)->md_flags |= MP_I386;
else
mpr_d(SrcePixRect)->md_flags &= (~MP_I386);
if (IN_DISPLAY_BANK(pbt->pbtdesthi))
mpr_d(DestPixRect)->md_flags |= MP_I386;
else
mpr_d(DestPixRect)->md_flags &= (~MP_I386);
#endif /* I386 */
mpr_mdlinebytes(DestPixRect) = (destbpl + 7) >> 3;
mpr_mdlinebytes(SrcePixRect) = (srcebpl + 7) >> 3;
}

View File

@@ -334,18 +334,10 @@ N_OP_stkscan
******************************************************************************/
LispPTR N_OP_stkscan(LispPTR tos) {
#ifdef I386
int scratchx[3];
int *scratch = (int *)(0xFFFFFFFC & (3 + (UNSIGNED)scratchx));
*scratch = tos;
nnewframe(CURRENTFX, (DLword *)scratch, POINTERMASK & *scratch);
return (swapx(*scratch));
#else
int scratch;
scratch = tos;
nnewframe(CURRENTFX, (DLword *)&scratch, POINTERMASK & scratch);
return (swapx(scratch));
#endif /* I386 */
}
/**************************************************

View File

@@ -479,10 +479,6 @@ void init_display2(DLword *display_addr, int display_max)
else
ColorDisplayPixrect = pr_open("/dev/fb");
DisplayRegionPixrect = mem_point(displaywidth, displayheight, 1, display_addr);
#ifdef I386
((struct mpr_data *)DisplayRegionPixrect->pr_data)->md_flags |= MP_I386;
((struct mpr_data *)ColorDisplayPixrect->pr_data)->md_flags |= MP_I386;
#endif
#ifdef DEBUG
pr_getcolormap(ColorDisplayPixrect, 0, 2, oldred, oldgreen, oldblue);
@@ -604,16 +600,6 @@ void display_before_exit() {
#endif /* DOS */
}
#ifdef DISPLAYBUFFER
#ifdef I386
#define EVENADDR(ptr) (0xFFFFFFFE & (int)ptr)
#else
#define EVENADDR(ptr) (ptr)
#endif
#endif /* DISPLAYBUFFER */
#if defined(DISPLAYBUFFER) || defined(DOS)
/************************************************************************/
/* */
@@ -647,16 +633,8 @@ in_display_segment(baseaddr)
void flush_display_buffer() {
#ifdef SUNDISPLAY
#ifdef DISPLAYBUFFER
#ifdef I386
bit_reverse_region(DisplayRegion68k, displaywidth, displayheight, DLWORD_PERLINE);
#endif
pr_rop(ColorDisplayPixrect, 0, 0, displaywidth, displayheight, COPY_PIXRECT_TO_COLOR,
DisplayRegionPixrect, 0, 0);
#ifdef I386
bit_reverse_region(DisplayRegion68k, displaywidth, displayheight, DLWORD_PERLINE);
#endif
#endif /* DISPLAYBUFFER */
#endif /* SUNDISPLAY */
@@ -737,18 +715,6 @@ void byte_swapped_displayregion(int x, int y, int w, int h)
/************************************************************************/
void flush_display_lineregion(UNSIGNED x, DLword *ybase, UNSIGNED w, UNSIGNED h)
#ifdef I386
{ /*flush_display_buffer(); */
int y;
y = ((DLword *)ybase - DisplayRegion68k) / DLWORD_PERLINE;
bit_reverse_region(ybase, displaywidth, h, DLWORD_PERLINE);
pr_rop(ColorDisplayPixrect, x, y, displaywidth, h, COPY_PIXRECT_TO_COLOR, DisplayRegionPixrect, x,
y);
bit_reverse_region(ybase, displaywidth, h, DLWORD_PERLINE);
}
#else
{
int y;
y = ((DLword *)ybase - DisplayRegion68k) / DLWORD_PERLINE;
@@ -766,7 +732,6 @@ void flush_display_lineregion(UNSIGNED x, DLword *ybase, UNSIGNED w, UNSIGNED h)
TPRINT(("Exit flush_display_lineregion\n"));
#endif /* DOS */
}
#endif /* I386 */
/************************************************************************/
/* */
@@ -786,18 +751,14 @@ void flush_display_lineregion(UNSIGNED x, DLword *ybase, UNSIGNED w, UNSIGNED h)
#define BITSPERWORD 16
void flush_display_ptrregion(DLword *ybase, UNSIGNED bitoffset, UNSIGNED w, UNSIGNED h)
#ifdef I386
{ flush_display_buffer(); }
#else
{
int y, x, baseoffset;
baseoffset = (((DLword *)ybase) - DisplayRegion68k);
y = baseoffset / DLWORD_PERLINE;
x = bitoffset + (BITSPERWORD * (baseoffset - (DLWORD_PERLINE * y)));
#endif /* I386 */
#if (defined(SUNDISPLAY) && defined(DISPLAYBUFFER))
pr_rop(ColorDisplayPixrect, x, y, w, h, COPY_PIXRECT_TO_COLOR, DisplayRegionPixrect, x, y);
pr_rop(ColorDisplayPixrect, x, y, w, h, COPY_PIXRECT_TO_COLOR, DisplayRegionPixrect, x, y);
#elif (defined(XWINDOW) || defined(DOS))
TPRINT(("Enter flush_display_ptrregion\n x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);

View File

@@ -530,26 +530,10 @@ int main(int argc, char *argv[])
JDS -- 1/18/90 also BITBLTSUB does it now. */
}
#ifdef I386
/* 80387 initialization */
asm(".data");
asm(".align 4");
asm("__FP_trunc:");
asm(" .globl __FP_trunc");
asm(".byte 0x3f");
asm(".byte 0x0c");
asm("__FP_round:");
asm(" .globl __FP_round");
asm(".byte 0x3f");
asm(".byte 0x00");
asm(".text");
asm("fldcw __FP_round");
#elif DOS
#ifdef DOS
_setrealmode(0x3f); /* Don't interrupt on FP overflows */
_getrealerror();
#endif /* I386 */
#ifdef DOS
tzset();
#endif

View File

@@ -202,8 +202,6 @@ LispPTR unix_getparm(LispPTR *args) {
if (strcmp(envname, "MACH") == 0) {
#if defined(sparc)
envvalue = "sparc";
#elif defined(I386)
envvalue = "i386";
#elif defined(DOS)
envvalue = "386";
#elif defined(MAIKO_OS_MACOS)
@@ -215,8 +213,6 @@ LispPTR unix_getparm(LispPTR *args) {
} else if (strcmp(envname, "ARCH") == 0) {
#if defined(sparc)
envvalue = "sun4";
#elif defined(I386)
envvalue = "sun386";
#elif defined(DOS)
envvalue = "dos";
#elif defined(MAIKO_OS_MACOS)

View File

@@ -131,10 +131,6 @@ register LispPTR tscache asm("bx");
#include "inlnSPARC.h"
#endif /* SPARCDISP */
#ifdef I386
#include "inln386i.h"
#endif
#include "fast_dsp.h"
/* trick now is that pccache points one ahead... */
@@ -1059,27 +1055,6 @@ nextopcode:
case377:
CLARITHEQUAL;
#ifdef I386
/* to defeat the damn optimizer, make it look like */
/* we might branch to the error labels. */
case 0400: goto plus_err;
case 0401: goto iplus_err;
case 0402: goto iplusn_err;
case 0403: goto idiff_err;
case 0404: goto diff_err;
case 0405: goto idiffn_err;
case 0406: goto greaterp_err;
case 0411: goto igreaterp_err;
case 0407: goto llsh8_err;
case 0410: goto lrsh1_err;
case 0414: goto lrsh8_err;
case 0417: goto llsh1_err;
case 0413: goto logor_err;
case 0412: goto logand_err;
case 0416: goto logxor_err;
case 0415: goto addbase_err;
#endif
default: error("should not default");
} /* switch */