save 4 bytes of text in sigvec.s
Steven M. Schultz
sms at wlv.imsd.contel.com
Sat Sep 23 16:37:51 AEST 1989
Subject: save 4 bytes of text in sigvec.s
Index: lib/libc/pdp/sys/sigvec.s 2.10BSD
Description:
The stack cleanup logic did not take advantage of the fact that
"mov (sp)+, (sp)" does not affect the carry bit. By taking
advantage of the pdp-11s architecture set 4 bytes of I-space
may be conserved.
Repeat-By:
Observation, i.e. RTFS.
Fix:
Apply the following patch:
*** sigvec.s.old Thu Jan 29 05:52:42 1987
--- sigvec.s Fri Sep 22 22:31:38 1989
***************
*** 31,43 ****
mov (sp),-(sp) / push return address down one place
mov $sigtramp,2(sp) / to leave a space for the address of
SYS(sigvec) / sigtramp
- bes 1f
mov (sp)+,(sp) / (clean up stack)
! rts pc
! 1:
! mov (sp)+,(sp) / (clean up stack)
mov r0,_errno
mov $-1,r0
rts pc
/*
--- 31,41 ----
mov (sp),-(sp) / push return address down one place
mov $sigtramp,2(sp) / to leave a space for the address of
SYS(sigvec) / sigtramp
mov (sp)+,(sp) / (clean up stack)
! bec 1f
mov r0,_errno
mov $-1,r0
+ 1:
rts pc
/*
More information about the Comp.bugs.2bsd
mailing list