X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=guile18%2Fqt%2Fmd%2Fvax.s;fp=guile18%2Fqt%2Fmd%2Fvax.s;h=fed03f043f6f1d7b5ff831a6d0305111c472ce13;hb=139c38d9204dd07f6b235f83bae644faedbc63fd;hp=0000000000000000000000000000000000000000;hpb=652ed35a2013489d0a14fede6307cd2595abb2c4;p=lilypond.git diff --git a/guile18/qt/md/vax.s b/guile18/qt/md/vax.s new file mode 100644 index 0000000000..fed03f043f --- /dev/null +++ b/guile18/qt/md/vax.s @@ -0,0 +1,69 @@ +/* + * QuickThreads -- Threads-building toolkit. + * Copyright (c) 1993 by David Keppel + * + * Permission to use, copy, modify and distribute this software and + * its documentation for any purpose and without fee is hereby + * granted, provided that the above copyright notice and this notice + * appear in all copies. This software is provided as a + * proof-of-concept and for demonstration purposes; there is no + * representation about the suitability of this software for any + * purpose. + */ + + .text + + .globl _qt_abort + .globl _qt_block + .globl _qt_blocki + .globl _qt_start + .globl _qt_vstart + + +/* +// Calls to these routines have the signature +// +// void *block (func, arg1, arg2, newsp) +// +// Since the prologue saves 5 registers, nargs, pc, fp, ap, mask, and +// a condition handler (at sp+0), the first argument is 40=4*10 bytes +// offset from the stack pointer. +*/ +_qt_block: +_qt_blocki: +_qt_abort: + .word 0x7c0 /* Callee-save mask: 5 registers. */ + movl 56(sp),r1 /* Get stack pointer of new thread. */ + movl 52(sp),-(r1) /* Push arg2 */ + movl 48(sp),-(r1) /* Push arg1 */ + movl sp,-(r1) /* Push arg0 */ + + movl 44(sp),r0 /* Get helper to call. */ + movl r1,sp /* Move to new thread's stack. */ + addl3 sp,$12,fp /* .. including the frame pointer. */ + calls $3,(r0) /* Call helper. */ + + ret + +_qt_start: + movl (sp)+,r0 /* Get `only'. */ + calls $3,(r0) /* Call `only'. */ + calls $0,_qt_error /* `only' erroniously returned. */ + + +_qt_vstart: + movl (sp)+,r10 /* Get `pt'. */ + movl (sp)+,r9 /* Get `startup'. */ + movl (sp)+,r8 /* Get `vuserf'. */ + movl (sp)+,r7 /* Get `cleanup'. */ + + pushl r10 /* Push `qt'. */ + calls $1,(r9) /* Call `startup', pop `qt' on return. */ + + calls (sp)+,(r8) /* Call user's function. */ + + pushl r0 /* Push `vuserf_retval'. */ + pushl r10 /* Push `qt'. */ + calls $2,(r7) /* Call `cleanup', never return. */ + + calls $0,_qt_error /* `cleanup' erroniously returned. */