Commit graph

5 commits

Author SHA1 Message Date
Duane Sand
c348a88376 android_memset.c: Use sanitized shifts
Avoid checks and traps on msb=1 unsigned shifts.

Change-Id: I5203a4290296b5557c0420ce0debad3b60d48233
2015-08-27 14:32:17 -07:00
Nick Kralevich
d9eda62875 android_memset.c: Use __attribute__((no_sanitize("integer")))
Turn off integer sanitization on android_memset. memset()ing is
expected to be a fast operation.

Avoid the use of the "while (size--) { }" construct, which harmlessly
underflows.

Change-Id: Ia61ff2323c759bf52df7e70b8be2fae0b0366dda
2015-08-27 13:14:36 -07:00
Duane Sand
1ef9ccd772 [MIPS] Fast android_memset for Mips64, Mipsr6
Fix broken mips64 build by replacing mips32r2-only android_memset.S.
Use HW-bonded pairs of 64-bit stores to fill 128 bits/cycle.
Rely on HW automatic cache prefetch optimizations.
Software cache prefetching is counterproductive on next mips cores.
New method is coded in C, and also works okay on non-Mips architectures.

Change-Id: Id7153a8fe11538fe25287e101375661b0e99e2a2
2015-04-16 18:26:22 -07:00
Elliott Hughes
a492f3797a Move mips/mips64 android_memset16/android_memset32 into libcutils.
Change-Id: Ia826dd872f64cc80635f50525a0c393f43ae5204
2015-04-02 11:59:22 -07:00
Duane Sand
1ca120588a Add Mips memset speedup
Change-Id: I157aa8b500e271c213bf615dd4ceb25b3aedd7c2
2012-08-29 12:33:50 -07:00