-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Arm32: correct string.h functions for "int" -> "unsigned char" conver…
…sion While Arm64 does so uniformly, for Arm32 only strchr() currently handles this properly. Add the necessary conversion also to strrchr(), memchr(), and memset(). As to the placement in memset(): Putting the new insn at the beginning of the function is apparently deemed more "obvious". It could be placed later, as the code reachable without ever making it to the "1" label only ever does byte stores. Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Bertrand Marquis <[email protected]>
- Loading branch information
Showing
3 changed files
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
.text | ||
.align 5 | ||
ENTRY(memchr) | ||
and r1, r1, #0xff | ||
1: subs r2, r2, #1 | ||
bmi 2f | ||
ldrb r3, [r0], #1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
.text | ||
.align 5 | ||
ENTRY(strrchr) | ||
and r1, r1, #0xff | ||
mov r3, #0 | ||
1: ldrb r2, [r0], #1 | ||
teq r2, r1 | ||
|