#269 Use cpir for (builtin) strnlen() and memchr()

open
nobody
z80 port (30)
4
2008-12-27
2008-12-27
No

The Z80 has the cpir instruction, which essentially implements memchr().
The Z80 port should use cpir to get a small, fast memchr() and strnlen(), maybe even as builtin functions. The code generated for the builtin function would probably be even less than the call overhead in many cases.

Philipp

Discussion

  • Philipp Klaus Krause

    Implemented for strlen() in revision #5330. Still not implemented for strnlen() and memchr().

     
  • Philipp Klaus Krause

    The strnlen() part is rejected, since it is not a standard C function (it is from POSIX.1-2008).

    Philipp

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks