SCCS-vsn: lib/libc/vax/DEFS.h 4.3
SCCS-vsn: lib/libc/vax/gen/_setjmp.s 4.3
SCCS-vsn: lib/libc/vax/gen/abort.s 4.2
SCCS-vsn: lib/libc/vax/stdlib/abs.s 4.2
SCCS-vsn: lib/libc/vax/gen/alloca.s 4.2
SCCS-vsn: lib/libc/vax/stdlib/atof.s 4.3
SCCS-vsn: lib/libc/vax/string/bcmp.s 4.3
SCCS-vsn: lib/libc/vax/string/bcopy.s 4.5
SCCS-vsn: lib/libc/vax/string/bzero.s 4.3
SCCS-vsn: lib/libc/vax/gen/fabs.s 4.2
SCCS-vsn: lib/libc/vax/string/ffs.s 4.2
SCCS-vsn: lib/libc/vax/gen/frexp.s 4.2
SCCS-vsn: lib/libc/vax/string/index.s 4.2
SCCS-vsn: lib/libcompat/4.3/vax/insque.s 4.2
SCCS-vsn: lib/libc/vax/gen/ldexp.s 4.2
SCCS-vsn: lib/libc/vax/gen/modf.s 4.2
SCCS-vsn: lib/libcompat/4.3/vax/nargs.s 4.2
SCCS-vsn: lib/libcompat/4.3/vax/remque.s 4.2
SCCS-vsn: lib/libc/vax/string/rindex.s 4.2
SCCS-vsn: lib/libc/vax/gen/setjmp.s 4.6
SCCS-vsn: lib/libc/vax/string/strcat.s 4.2
SCCS-vsn: lib/libc/vax/string/strcmp.s 4.2
SCCS-vsn: lib/libc/vax/string/strcpy.s 4.2
SCCS-vsn: lib/libc/vax/string/strlen.s 4.2
SCCS-vsn: lib/libc/vax/string/strncat.s 4.2
SCCS-vsn: lib/libc/vax/string/strncmp.s 4.2
SCCS-vsn: lib/libc/vax/string/strncpy.s 4.2
SCCS-vsn: lib/libc/vax/gen/udiv.s 4.3
SCCS-vsn: lib/libc/vax/gen/urem.s 4.3
29 files changed:
-/* DEFS.h 4.2 83/06/27 */
+/* DEFS.h 4.3 84/11/01 */
+
+#define R0 0x001
+#define R1 0x002
+#define R2 0x004
+#define R3 0x008
+#define R4 0x010
+#define R5 0x020
+#define R6 0x040
+#define R7 0x080
+#define R8 0x100
+#define R9 0x200
+#define R10 0x400
+#define R11 0x800
-#define ENTRY(x) .globl _/**/x; .align 2; _/**/x: .word 0; \
- .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
-#define ASENTRY(x) .globl x; .align 2; x: .word 0; \
- .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
+#define ENTRY(x, regs) \
+ .globl _/**/x; .align 2; _/**/x: .word regs; \
+ .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
+#define ASENTRY(x, regs) \
+ .globl x; .align 2; x: .word regs; \
+ .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
-#define ENTRY(x) .globl _/**/x; .align 2; _/**/x: .word 0
-#define ASENTRY(x) .globl x; .align 2; x: .word 0
+#define ENTRY(x, regs) \
+ .globl _/**/x; .align 2; _/**/x: .word regs
+#define ASENTRY(x, regs) \
+ .globl x; .align 2; x: .word regs
-/* _setjmp.s 4.2 83/07/02 */
+/* _setjmp.s 4.3 84/11/01 */
/*
* C library -- _setjmp, _longjmp
/*
* C library -- _setjmp, _longjmp
movl 4(ap),r0
movl 12(fp),(r0) # save frame pointer of caller
movl 16(fp),4(r0) # save pc of caller
clrl r0
ret
movl 4(ap),r0
movl 12(fp),(r0) # save frame pointer of caller
movl 16(fp),4(r0) # save pc of caller
clrl r0
ret
movl 8(ap),r0 # return(v)
movl 4(ap),r1 # fetch buffer
tstl (r1)
movl 8(ap),r0 # return(v)
movl 4(ap),r1 # fetch buffer
tstl (r1)
-/* abort.s 4.1 83/06/27 */
+/* abort.s 4.2 84/11/01 */
/* C library -- abort */
#include "DEFS.h"
/* C library -- abort */
#include "DEFS.h"
-/* alloca.s 4.1 83/06/27 */
-/* like alloc, but automatic automatic free in return */
+/* alloca.s 4.2 84/11/01 */
+/* like alloc, but automatic free in return */
subl2 4(ap),sp /* crude allocation */
movl 16(fp),r1 /* pc */
movq 8(fp),ap /* new (old) ap and fp */
subl2 4(ap),sp /* crude allocation */
movl 16(fp),r1 /* pc */
movq 8(fp),ap /* new (old) ap and fp */
-/* fabs.s 4.1 83/06/27 */
+/* fabs.s 4.2 84/11/01 */
/* fabs - floating absolute value */
#include "DEFS.h"
/* fabs - floating absolute value */
#include "DEFS.h"
movd 4(ap),r0
bgeq 1f
mnegd r0,r0
movd 4(ap),r0
bgeq 1f
mnegd r0,r0
-/* frexp.s 4.1 84/08/22 */
+/* frexp.s 4.2 84/11/01 */
/* C library -- frexp(value, eptr) */
#include "DEFS.h"
/* C library -- frexp(value, eptr) */
#include "DEFS.h"
movd 4(ap),r0 # (r0,r1) := value
extzv $7,$8,r0,*12(ap) # Fetch exponent
jeql 1f # If exponent zero, we're done
movd 4(ap),r0 # (r0,r1) := value
extzv $7,$8,r0,*12(ap) # Fetch exponent
jeql 1f # If exponent zero, we're done
-/* ldexp.s 4.1 83/06/27 */
+/* ldexp.s 4.2 84/11/01 */
/*
* double ldexp (value, exp)
/*
* double ldexp (value, exp)
movd 4(ap),r0 /* fetch "value" */
extzv $7,$8,r0,r2 /* r2 := biased exponent */
jeql 1f /* if zero, done */
movd 4(ap),r0 /* fetch "value" */
extzv $7,$8,r0,r2 /* r2 := biased exponent */
jeql 1f /* if zero, done */
-/* modf.s 4.1 83/06/27 */
+/* modf.s 4.2 84/11/01 */
/*
* double modf (value, iptr)
/*
* double modf (value, iptr)
emodd 4(ap),$0,$0f1.0,r2,r0
jvs 1f # integer overflow
cvtld r2,*12(ap)
emodd 4(ap),$0,$0f1.0,r2,r0
jvs 1f # integer overflow
cvtld r2,*12(ap)
-/* setjmp.s 4.5 83/08/14 */
+/* setjmp.s 4.6 84/11/01 */
/*
* C library -- setjmp, longjmp
/*
* C library -- setjmp, longjmp
pushl $0
calls $1,_sigblock # get signal mask
movl r0,r1
pushl $0
calls $1,_sigblock # get signal mask
movl r0,r1
movl 8(ap),r0 # return(v)
movl 4(ap),r1 # fetch buffer
tstl (r1)
movl 8(ap),r0 # return(v)
movl 4(ap),r1 # fetch buffer
tstl (r1)
-/* udiv.s 4.2 83/06/27 */
+/* udiv.s 4.3 84/11/01 */
/*
* udiv - unsigned division for vax-11
/*
* udiv - unsigned division for vax-11
movl 4(ap),r0 /* dividend */
movl 8(ap),r2 /* divisor */
jeql 1f /* if divisor=0, force exception */
movl 4(ap),r0 /* dividend */
movl 8(ap),r2 /* divisor */
jeql 1f /* if divisor=0, force exception */
-/* urem.s 4.2 83/06/27 */
+/* urem.s 4.3 84/11/01 */
/*
* urem - unsigned remainder for vax-11
/*
* urem - unsigned remainder for vax-11
movl 4(ap),r0 /* dividend */
movl 8(ap),r2 /* divisor */
jeql 1f /* if divisor=0, force exception */
movl 4(ap),r0 /* dividend */
movl 8(ap),r2 /* divisor */
jeql 1f /* if divisor=0, force exception */
-/* abs.s 4.1 83/06/27 */
+/* abs.s 4.2 84/11/01 */
/* abs - int absolute value */
#include "DEFS.h"
/* abs - int absolute value */
#include "DEFS.h"
movl 4(ap),r0
bgeq 1f
mnegl r0,r0
movl 4(ap),r0
bgeq 1f
mnegl r0,r0
-/* atof.s 4.2 83/06/30 */
+/* atof.s 4.3 84/11/01 */
* second section: scratch
* r5: the decimal exponent
* r6-7: scratch
* second section: scratch
* r5: the decimal exponent
* r6-7: scratch
*/
.set msign,0 # mantissa has negative sign
.set esign,1 # exponent has negative sign
.set decpt,2 # decimal point encountered
*/
.set msign,0 # mantissa has negative sign
.set esign,1 # exponent has negative sign
.set decpt,2 # decimal point encountered
- .align 2
-two31: .word 0x5000 # 2 ** 31
- .word 0 # (=2147483648)
- .word 0 # in floating-point
- .word 0 # (so atof doesn't have to convert it)
-/*
- * Entry point
- */
-ENTRY(atof)
- pushl r6
- pushl r7
movd r0,-(sp) # and also mantissa
calls $3,_ldexp # go combine them
movd r0,-(sp) # and also mantissa
calls $3,_ldexp # go combine them
- movl (sp)+,r7
- movl (sp)+,r6
+
+ .align 2
+two31: .word 0x5000 # 2 ** 31
+ .word 0 # (=2147483648)
+ .word 0 # in floating-point
+ .word 0 # (so atof doesn't have to convert it)
-/* @(#)bcmp.s 4.2 %G% */
+/* @(#)bcmp.s 4.3 %G% */
/* bcmp(s1, s2, n) */
#include "DEFS.h"
/* bcmp(s1, s2, n) */
#include "DEFS.h"
movl 4(ap),r1
movl 8(ap),r3
movl 12(ap),r4
movl 4(ap),r1
movl 8(ap),r3
movl 12(ap),r4
-/* @(#)bcopy.s 4.4 %G% */
+/* @(#)bcopy.s 4.5 %G% */
/* bcopy(from, to, size) */
#include "DEFS.h"
/* bcopy(from, to, size) */
#include "DEFS.h"
- .globl _bcopy
-_bcopy:
- .word 0x0040
-#ifdef PROF
- .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
-#endif PROF
movl 4(ap),r1
movl 8(ap),r3
movl 12(ap),r6
movl 4(ap),r1
movl 8(ap),r3
movl 12(ap),r6
-/* @(#)bzero.s 4.2 %G% */
+/* @(#)bzero.s 4.3 %G% */
/* bzero(base, length) */
#include "DEFS.h"
/* bzero(base, length) */
#include "DEFS.h"
/* bit = ffs(value) */
#include "DEFS.h"
/* bit = ffs(value) */
#include "DEFS.h"
ffs $0,$32,4(ap),r0
bneq 1f
mnegl $1,r0
ffs $0,$32,4(ap),r0
bneq 1f
mnegl $1,r0
-/* index.s 4.1 84/11/01 */
+/* index.s 4.2 84/11/01 */
/*
* Find the first occurence of c in the string cp.
/*
* Find the first occurence of c in the string cp.
* index(cp, c)
* char *cp, c;
*/
* index(cp, c)
* char *cp, c;
*/
movq 4(ap),r1 # r1 = cp; r2 = c
tstl r2 # check for special case c == '\0'
bneq 2f
movq 4(ap),r1 # r1 = cp; r2 = c
tstl r2 # check for special case c == '\0'
bneq 2f
-/* rindex.s 4.1 84/11/01 */
+/* rindex.s 4.2 84/11/01 */
/*
* Find the last occurence of c in the string cp.
/*
* Find the last occurence of c in the string cp.
* rindex(cp, c)
* char *cp, c;
*/
* rindex(cp, c)
* char *cp, c;
*/
movq 4(ap),r1 # r1 = cp; r2 = c
tstl r2 # check for special case c == '\0'
bneq 2f
movq 4(ap),r1 # r1 = cp; r2 = c
tstl r2 # check for special case c == '\0'
bneq 2f
-/* strcat.s 4.1 84/11/01 */
+/* strcat.s 4.2 84/11/01 */
/*
* Concatenate string s2 to the end of s1
/*
* Concatenate string s2 to the end of s1
* strcat(s1, s2)
* char *s1, *s2;
*/
* strcat(s1, s2)
* char *s1, *s2;
*/
movq 4(ap), r6 # r6 = s1; r7 = s2
movl r6,r1
0:
movq 4(ap), r6 # r6 = s1; r7 = s2
movl r6,r1
0:
-/* strcmp.s 4.1 84/11/01 */
+/* strcmp.s 4.2 84/11/01 */
/*
* Compare string s1 lexicographically to string s2.
/*
* Compare string s1 lexicographically to string s2.
* strcmp(s1, s2)
* char *s1, *s2;
*/
* strcmp(s1, s2)
* char *s1, *s2;
*/
movq 4(ap),r3 # r3 = s1; r4 = s2
1:
locc $0,$65535,(r4) # look for '\0' in s2
movq 4(ap),r3 # r3 = s1; r4 = s2
1:
locc $0,$65535,(r4) # look for '\0' in s2
-/* strcpy.s 4.1 84/11/01 */
+/* strcpy.s 4.2 84/11/01 */
/*
* Copy string s2 over top of s1.
/*
* Copy string s2 over top of s1.
* strcpy(s1, s2)
* char *s1, *s2;
*/
* strcpy(s1, s2)
* char *s1, *s2;
*/
movl 4(ap), r3 # r3 = s1
movl 8(ap), r6 # r6 = s2
1:
movl 4(ap), r3 # r3 = s1
movl 8(ap), r6 # r6 = s2
1:
-/* strlen.s 4.1 84/11/01 */
+/* strlen.s 4.2 84/11/01 */
/*
* Return the length of cp (not counting '\0').
/*
* Return the length of cp (not counting '\0').
* strlen(cp)
* char *cp;
*/
* strlen(cp)
* char *cp;
*/
movl 4(ap),r2
0:
locc $0,$65535,(r2) # look for '\0'
movl 4(ap),r2
0:
locc $0,$65535,(r2) # look for '\0'
-/* strncat.s 4.1 84/11/01 */
+/* strncat.s 4.2 84/11/01 */
/*
* Concatenate string s2 on the end of s1
/*
* Concatenate string s2 on the end of s1
* char *s1, *s2;
* int n;
*/
* char *s1, *s2;
* int n;
*/
movl 12(ap),r6 # r6 = n
bleq done # n <= 0
movl 4(ap),r3 # r3 = s1
movl 12(ap),r6 # r6 = n
bleq done # n <= 0
movl 4(ap),r3 # r3 = s1
-/* strncmp.s 4.1 84/11/01 */
+/* strncmp.s 4.2 84/11/01 */
/*
* Compare at most n characters of string
/*
* Compare at most n characters of string
* char *s1, *s2;
* int n;
*/
* char *s1, *s2;
* int n;
*/
movl 12(ap),r5 # r5 = n
movq 4(ap),r3 # r3 = s1; r4 = s2
1:
movl 12(ap),r5 # r5 = n
movq 4(ap),r3 # r3 = s1; r4 = s2
1:
-/* strncpy.s 4.1 84/11/01 */
+/* strncpy.s 4.2 84/11/01 */
/*
* Copy string s2 over top of string s1.
/*
* Copy string s2 over top of string s1.
* strncpy(s1, s2, n)
* char *s1, *s2;
*/
* strncpy(s1, s2, n)
* char *s1, *s2;
*/
movl 12(ap),r6 # r6 = n
bleq done # n <= 0
movl 4(ap),r3 # r3 = s1
movl 12(ap),r6 # r6 = n
bleq done # n <= 0
movl 4(ap),r3 # r3 = s1
-/* @(#)insque.s 4.1 %G% */
+/* @(#)insque.s 4.2 %G% */
/* insque(new, pred) */
#include "DEFS.h"
/* insque(new, pred) */
#include "DEFS.h"
insque *4(ap), *8(ap)
ret
insque *4(ap), *8(ap)
ret
-/* nargs.s 4.1 83/06/27 */
+/* nargs.s 4.2 84/11/01 */
/* C library -- nargs */
#include "DEFS.h"
/* C library -- nargs */
#include "DEFS.h"
movzbl *8(fp),r0 /* 8(fp) is old ap */
ret
movzbl *8(fp),r0 /* 8(fp) is old ap */
ret
-/* @(#)remque.s 4.1 %G% */
+/* @(#)remque.s 4.2 %G% */
/* remque(entry) */
#include "DEFS.h"
/* remque(entry) */
#include "DEFS.h"