No reason these can't share code...
This commit is contained in:
parent
230b816542
commit
cd8e1bd162
|
@ -38,12 +38,16 @@
|
|||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
.text
|
||||
/*.asciz "from: @(#)index.s 5.1 (Berkeley) 5/12/90"*/
|
||||
.asciz "$Id: index.S,v 1.1 1993/11/25 23:38:29 paulus Exp $"
|
||||
.asciz "$Id: index.S,v 1.2 1993/12/08 21:01:56 mycroft Exp $"
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "DEFS.h"
|
||||
|
||||
#ifdef STRCHR
|
||||
ENTRY(strchr)
|
||||
#else
|
||||
ENTRY(index)
|
||||
#endif
|
||||
movl sp@(4),a0 /* string */
|
||||
movb sp@(11),d0 /* char to look for */
|
||||
ixloop:
|
||||
|
|
|
@ -38,12 +38,16 @@
|
|||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
.text
|
||||
/*.asciz "from: @(#)rindex.s 5.1 (Berkeley) 5/12/90"*/
|
||||
.asciz "$Id: rindex.S,v 1.1 1993/11/25 23:38:30 paulus Exp $"
|
||||
.asciz "$Id: rindex.S,v 1.2 1993/12/08 21:01:58 mycroft Exp $"
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "DEFS.h"
|
||||
|
||||
#ifdef STRRCHR
|
||||
ENTRY(strrchr)
|
||||
#else
|
||||
ENTRY(rindex)
|
||||
#endif
|
||||
movl sp@(4),a0 /* string */
|
||||
movb sp@(11),d0 /* char to look for */
|
||||
subl a1,a1 /* clear rindex pointer */
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#define STRCHR
|
||||
#include "index.S"
|
|
@ -0,0 +1,2 @@
|
|||
#define STRRCHR
|
||||
#include "rindex.S"
|
Loading…
Reference in New Issue