Fix arm memset() handling of negative arguments

This fixes the sgt-mines plugin. Same issue was present in an old
glibc as well:

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=a7ed1adbecb6aac49af75aae3b3498798cf63abc
This commit is contained in:
Franklin Wei 2017-07-27 00:00:51 -04:00 committed by Franklin Wei
parent 076cf0aa9b
commit c2546d3187

View file

@ -50,6 +50,7 @@ memset:
/*
* we know that the pointer in r0 is aligned to a word boundary.
*/
and r1, r1, #255 @ clear sign bits
orr r1, r1, r1, lsl #8
orr r1, r1, r1, lsl #16
mov r3, r1