You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ( ((constchar*)src >= (constchar*)0x40000000) && ((constchar*)dest< (constchar*)0x40000000) )
returnmemcpy_P(dest, src, n);
else
returnmemmove(dest, src, n);
}
Since it is checking for a number with only one bit set... I wondered if just checking that fact does anything to the code, since we could simply discard the idea that it is going to be used on any 'higher' addresses.
Not sure how to benchmark it, though, so I am not really sure if this does anything useful at all
(besides making it 5 bytes smaller :)
Looking at the current
memmove_P
implementationnewlib-xtensa/newlib/libc/sys/xtensa/string_pgmspace.c
Lines 184 to 190 in ebc9675
Since it is checking for a number with only one bit set... I wondered if just checking that fact does anything to the code, since we could simply discard the idea that it is going to be used on any 'higher' addresses.
Not sure how to benchmark it, though, so I am not really sure if this does anything useful at all
(besides making it 5 bytes smaller :)
The text was updated successfully, but these errors were encountered: