mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-14 07:30:21 +00:00
Remove outdated hand-optimized assembler support for gcc on 386 (#379)
This commit is contained in:
parent
2122f095e8
commit
f42671022f
@ -53,9 +53,6 @@
|
||||
#include "commondefs.h"
|
||||
#include "ufsdefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif /* GCC386 */
|
||||
|
||||
extern int *Lisp_errno;
|
||||
extern int Dummy_errno;
|
||||
|
||||
@ -24,9 +24,6 @@
|
||||
#include "commondefs.h"
|
||||
#include "gchtfinddefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif
|
||||
|
||||
#define MaskShift(x) (((x) << 16) & SEGMASK)
|
||||
|
||||
|
||||
@ -34,9 +34,6 @@
|
||||
#include "gc2defs.h"
|
||||
#include "gcscandefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif /* GCC386 */
|
||||
|
||||
/**********************************************************************/
|
||||
/*
|
||||
|
||||
201
src/gcmain3.c
201
src/gcmain3.c
@ -52,9 +52,6 @@
|
||||
#include "gcrcelldefs.h"
|
||||
#include "gcscandefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif
|
||||
|
||||
#define WORDSPERCELL 2
|
||||
#define MAXHTCNT 63
|
||||
@ -99,203 +96,6 @@
|
||||
#define STKREFBIT 0x200
|
||||
#endif /* BIGVM */
|
||||
|
||||
#ifdef GCC386
|
||||
/* byte-swapped, 386 assembler version */
|
||||
LispPTR gcmapscan() {
|
||||
volatile DLword probe;
|
||||
volatile DLword *entry;
|
||||
volatile DLword offset;
|
||||
volatile LispPTR ptr;
|
||||
|
||||
asm volatile(
|
||||
" \n\
|
||||
movl $32768,%%edi / probe = HTSIZE. \n\
|
||||
.align 4 \n\
|
||||
nextentry: / nextentry: \n\
|
||||
decl %%edi \n\
|
||||
js returNIL \n\
|
||||
leal 0(,%%edi,2),%%esi \n\
|
||||
addl HTmain,%%esi /htlptr = (struct htlinkptr *)(HTmain+probe); \n\
|
||||
.align 4 \n\
|
||||
scanloop: \n\
|
||||
movl %%esi,%%edx \n\
|
||||
xorb $2,%%dl \n\
|
||||
movzwl (%%edx),%%eax / contents = ((struct htlinkptr *)WORDPTR(htlptr))->contents \n\
|
||||
testl %%eax,%%eax / if (contents && \n\
|
||||
je scanbot \n\
|
||||
testb $1,%%al \n\
|
||||
jne scanok \n\
|
||||
testb $254,%%ah \n\
|
||||
jne scanbot \n\
|
||||
scanok: \n\
|
||||
jmp scandone \n\
|
||||
.align 4 \n\
|
||||
scanbot: \n\
|
||||
addl $-2,%%esi / end of while loop. \n\
|
||||
decl %%edi \n\
|
||||
jns scanloop \n\
|
||||
jmp returNIL \n\
|
||||
\n\
|
||||
\n\
|
||||
scandone: \n\
|
||||
movl %%edx,%0 / entry = (DLword *) HTmain + probe. \n\
|
||||
retry: / retry: \n\
|
||||
movl %0,%%ecx \n\
|
||||
movzwl (%%ecx),%%eax \n\
|
||||
testb $1,%%al / if HENTRY->collision, \n\
|
||||
je nocollision \n\
|
||||
xorl %%esi,%%esi / prev = 0 \n\
|
||||
andl $65534,%%eax \n\
|
||||
linkloop: // linkloop: \n\
|
||||
leal 0(,%%eax,2),%%ecx \n\
|
||||
addl HTcoll,%%ecx \n\
|
||||
movw 2(%%ecx),%%ax / offset = ((struct htcoll *)link)->free_ptr; \n\
|
||||
testb $254,%%ah / if StkCountIsZero(offset) \n\
|
||||
jne stknz \n\
|
||||
sall $15,%%eax / , (probe << 1)); \n\
|
||||
andl $16711680,%%eax \n\
|
||||
leal 0(,%%edi,2),%%edx \n\
|
||||
orl %%eax,%%edx \n\
|
||||
movl %%edx,%2 / to ptr. \n\
|
||||
testl %%esi,%%esi / DelLink. if (prev != 0) \n\
|
||||
je prevZ \n\
|
||||
leal 2(%%esi),%%edx / GETWORD((DLword *)prev + 1) = GETWORD((DLword *)link + 1) \n\
|
||||
xorb $2,%%dl \n\
|
||||
leal 2(%%ecx),%%eax \n\
|
||||
xorb $2,%%al \n\
|
||||
movw (%%eax),%%ax \n\
|
||||
jmp freelink \n\
|
||||
.align 4 \n\
|
||||
prevZ: \n\
|
||||
movl %0,%%edx / else GETWORD((DLword *)entry) = GETWORD((DLword *)link + 1) \n\
|
||||
leal 2(%%ecx),%%eax \n\
|
||||
xorb $2,%%al \n\
|
||||
movw (%%eax),%%ax \n\
|
||||
orb $1,%%al \n\
|
||||
freelink: / FreeLink \n\
|
||||
movw %%ax,(%%edx) \n\
|
||||
movl %%ecx,%%eax \n\
|
||||
xorb $2,%%al \n\
|
||||
movw $0,(%%eax) \n\
|
||||
leal 2(%%ecx),%%eax \n\
|
||||
xorb $2,%%al \n\
|
||||
movl HTcoll,%%edx / GETWORD(link+1) = GETWORD(HTcoll); \n\
|
||||
xorb $2,%%dl \n\
|
||||
movw (%%edx),%%dx \n\
|
||||
movw %%dx,(%%eax) \n\
|
||||
movl HTcoll,%%edx / GETWORD(HTcoll) = (link - HTcoll); \n\
|
||||
xorb $2,%%dl \n\
|
||||
movl %%ecx,%%eax \n\
|
||||
subl HTcoll,%%eax \n\
|
||||
sarl $1,%%eax \n\
|
||||
movw %%ax,(%%edx) \n\
|
||||
movl %0,%%esi / link = (DLword *)HTcoll + GetLinkptr(GETWORD((DLword *)entry \n\
|
||||
movw (%%esi),%%ax \n\
|
||||
andl $65534,%%eax \n\
|
||||
addl %%eax,%%eax \n\
|
||||
movl %%eax,%%ecx \n\
|
||||
addl HTcoll,%%ecx \n\
|
||||
leal 2(%%ecx),%%edx / if (GETWORD((DLword *)link + 1) == 0) { \n\
|
||||
xorb $2,%%dl \n\
|
||||
cmpw $0,(%%edx) \n\
|
||||
jne sgclp1 \n\
|
||||
movl %%ecx,%%eax / GETWORD((DLword *)entry) = GETWORD((DLword *)link) \n\
|
||||
xorb $2,%%al \n\
|
||||
movw (%%eax),%%bx \n\
|
||||
movw %%bx,(%%esi) \n\
|
||||
movw $0,(%%eax) / FreeLink: GETWORD(link) = 0 \n\
|
||||
movl HTcoll,%%eax / GETWORD(link+1) = GETWORD(HTcoll) \n\
|
||||
xorb $2,%%al \n\
|
||||
movw (%%eax),%%bx \n\
|
||||
movw %%bx,(%%edx) \n\
|
||||
movl %%ecx,%%ebx \n\
|
||||
subl HTcoll,%%ebx \n\
|
||||
sarl $1,%%ebx \n\
|
||||
movw %%bx,(%%eax) \n\
|
||||
.align 4 \n\
|
||||
sgclp1: / start of gcloop 1 - do setup \n\
|
||||
movl GcDisabled_word,%%ecx \n\
|
||||
movl MDStypetbl,%%ebx \n\
|
||||
gclp1: / GcreclaimLp: \n\
|
||||
pushl %2 \n\
|
||||
call gcreccell \n\
|
||||
addl $4,%%esp \n\
|
||||
movl %%eax,%2 \n\
|
||||
testl %%eax,%%eax \n\
|
||||
je eogclp1 \n\
|
||||
shrl $9,%%eax \n\
|
||||
leal 0(%%ebx,%%eax,2),%%eax \n\
|
||||
xorb $2,%%al \n\
|
||||
cmpw $0,(%%eax) \n\
|
||||
jl gclp1 \n\
|
||||
cmpl $76,(%%ecx) \n\
|
||||
je gclp1 \n\
|
||||
pushl $0 \n\
|
||||
pushl %2 \n\
|
||||
call rec_htfind \n\
|
||||
addl $8,%%esp \n\
|
||||
jmp gclp1 \n\
|
||||
.align 4 \n\
|
||||
.align 4 \n\
|
||||
eogclp1: \n\
|
||||
movl %0,%%eax / if (HTLPTR->contents == 0) \n\
|
||||
cmpw $0,(%%eax) \n\
|
||||
je nextentry / goto nextentry; \n\
|
||||
jmp retry / else goto retry; \n\
|
||||
.align 4 \n\
|
||||
.align 4 \n\
|
||||
\n\
|
||||
stknz: \n\
|
||||
movw (%%ecx),%%ax / if ((offset = ((struct htcoll *)link)->next_free)) \n\
|
||||
testw %%ax,%%ax \n\
|
||||
je nextentry \n\
|
||||
movl %%ecx,%%esi \n\
|
||||
andl $65535,%%eax \n\
|
||||
jmp linkloop \n\
|
||||
.align 4 \n\
|
||||
.align 4 \n\
|
||||
nocollision: \n\
|
||||
testw $65024,(%%ecx) / if (StkCntIsZero(HTLPTR->contents)) { \n\
|
||||
jne nextentry \n\
|
||||
movw (%%ecx),%%dx /ptr = VAG2(HENTRY->segnum, (probe << 1)); \n\
|
||||
sall $15,%%edx \n\
|
||||
andl $16711680,%%edx \n\
|
||||
leal (,%%edi,2),%%eax \n\
|
||||
orl %%eax,%%edx \n\
|
||||
movl %%edx,%2 \n\
|
||||
movw $0,(%%ecx) / HTLPTR->contents = 0 \n\
|
||||
.align 4 \n\
|
||||
movl GcDisabled_word,%%ecx \n\
|
||||
movl MDStypetbl,%%ebx \n\
|
||||
gclp2: / GcreclaimLp \n\
|
||||
pushl %2 \n\
|
||||
call gcreccell \n\
|
||||
addl $4,%%esp \n\
|
||||
movl %%eax,%2 \n\
|
||||
testl %%eax,%%eax \n\
|
||||
je nextentry \n\
|
||||
shrl $9,%%eax \n\
|
||||
leal 0(%%ebx,%%eax,2),%%eax \n\
|
||||
xorb $2,%%al \n\
|
||||
cmpw $0,(%%eax) \n\
|
||||
jl gclp2 \n\
|
||||
cmpl $76,(%%ecx) \n\
|
||||
je gclp2 \n\
|
||||
pushl $0 \n\
|
||||
pushl %2 \n\
|
||||
call rec_htfind \n\
|
||||
addl $8,%%esp \n\
|
||||
jmp gclp2 \n\
|
||||
.align 4 \n\
|
||||
returNIL: \n\
|
||||
"
|
||||
: "=g"(entry), "=g"(offset), "=g"(ptr)
|
||||
:
|
||||
: "ax", "dx", "cx", "bx", "si", "di");
|
||||
|
||||
return NIL;
|
||||
}
|
||||
#else
|
||||
|
||||
LispPTR gcmapscan(void) {
|
||||
register GCENTRY probe;
|
||||
@ -342,7 +142,6 @@ nextentry:
|
||||
}
|
||||
return (NIL);
|
||||
}
|
||||
#endif /* GCC386 */
|
||||
|
||||
LispPTR gcmapunscan(void) {
|
||||
register GCENTRY probe;
|
||||
|
||||
@ -49,9 +49,6 @@
|
||||
#include "commondefs.h"
|
||||
#include "mkcelldefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif
|
||||
|
||||
#define TCPhostlookup 0
|
||||
#define TCPservicelookup 1
|
||||
|
||||
@ -30,9 +30,6 @@
|
||||
#include "byteswapdefs.h"
|
||||
#include "initdspdefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif /* GCC386 */
|
||||
|
||||
#define IFPAGE_ADDRESS 512
|
||||
#define DEFAULT_MAX_SYSOUTSIZE 64 /* in Mbyte */
|
||||
|
||||
@ -33,9 +33,6 @@
|
||||
#include "car-cdrdefs.h"
|
||||
#include "conspagedefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif /* GCC386 */
|
||||
|
||||
/* to optionally swap the fnhead field of a frame */
|
||||
#ifdef BIGVM
|
||||
|
||||
@ -61,9 +61,6 @@
|
||||
#include "perrnodefs.h"
|
||||
#include "ufsdefs.h"
|
||||
|
||||
#ifdef GCC386
|
||||
#include "inlnPS2.h"
|
||||
#endif
|
||||
|
||||
/* Error return values from VMEMSAVE */
|
||||
#define COMPLETESYSOUT NIL
|
||||
|
||||
7
src/xc.c
7
src/xc.c
@ -112,12 +112,7 @@ extern MouseInterface currentmouse;
|
||||
typedef struct conspage ConsPage;
|
||||
typedef ByteCode *InstPtr;
|
||||
|
||||
#ifdef GCC386
|
||||
register InstPtr pccache asm("si");
|
||||
register LispPTR *cspcache asm("di");
|
||||
register LispPTR tscache asm("bx");
|
||||
#include "inlnPS2.h"
|
||||
#elif (DOS && OPDISP)
|
||||
#if (DOS && OPDISP)
|
||||
#include "inlndos.h"
|
||||
register InstPtr pccache asm("si");
|
||||
register LispPTR *cspcache asm("di");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user