mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Optimize the inlined strlen.
This commit is contained in:
parent
0291c92ffb
commit
6011bdb2f6
@ -1245,9 +1245,8 @@ static void StdFunc_strlen (FuncDesc* F attribute ((unused)), ExprDesc* Expr)
|
||||
AddCodeLine ("ldy #$FF");
|
||||
g_defcodelabel (L);
|
||||
AddCodeLine ("iny");
|
||||
AddCodeLine ("lda %s,y", ED_GetLabelName (&Arg, 0));
|
||||
AddCodeLine ("ldx %s,y", ED_GetLabelName (&Arg, 0));
|
||||
AddCodeLine ("bne %s", LocalLabelName (L));
|
||||
AddCodeLine ("tax");
|
||||
AddCodeLine ("tya");
|
||||
|
||||
/* The function result is an rvalue in the primary register */
|
||||
|
Loading…
Reference in New Issue
Block a user