Article View: comp.bugs.2bsd
Article #32save 4 bytes of text in sigvec.s
From: Steven M. Schultz
Date: Sat, 23 Sep 1989 06:37
Date: Sat, 23 Sep 1989 06:37
43 lines
1569 bytes
1569 bytes
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 /*
Technical Details
Message-ID:
<37053@wlbr.IMSD.CONTEL.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ginosko!aplcen!uakari.primate.wisc.edu!ames!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!mahendo!wlbr!wlv!smsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ginosko!aplcen!uakari.primate.wisc.edu!ames!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!mahendo!wlbr!wlv!sms From: sms@wlv.imsd.contel.com (Steven M. Schultz) Newsgroups: comp.bugs.2bsd Subject: save 4 bytes of text in sigvec.s Keywords: pdp-11 Message-ID: <37053@wlbr.IMSD.CONTEL.COM> Date: 23 Sep 89 06:37:51 GMT Sender: news@wlbr.IMSD.CONTEL.COM Reply-To: sms@wlv.imsd.contel.com (Steven M. Schultz) Organization: Contel Federal Systems Lines: 43