diff options
| author | Wei Wang <wangw@codeaurora.org> | 2013-07-18 10:42:52 -0700 |
|---|---|---|
| committer | Whitehawkx <xxwhitehawk@gmail.com> | 2013-12-21 12:19:39 -0800 |
| commit | cbbcb0c47115a3aabfdfb2303864f9418c2d9dcd (patch) | |
| tree | d8663c1426e04c5404255d8f0ed3692f6cc0fce3 /vm/native/java_lang_System.cpp | |
| parent | 4d046219d235fa5246d6bb51c5ecdf0b5367e81a (diff) | |
dalvik: use bioinc memmove
use memmove from bioinc if it is halfword atomic.
Change-Id: I81c38c2b504483b69b0b1c1e4ffb63cb81d347d5
Diffstat (limited to 'vm/native/java_lang_System.cpp')
| -rw-r--r-- | vm/native/java_lang_System.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vm/native/java_lang_System.cpp b/vm/native/java_lang_System.cpp index 1b07f85ad..4485a9217 100644 --- a/vm/native/java_lang_System.cpp +++ b/vm/native/java_lang_System.cpp @@ -62,6 +62,10 @@ * TODO: use __builtin_prefetch * TODO: write an ARM-optimized version */ +#if defined(HAVE_HALFWORD_ATOMIC_MEMMOVE) +#define move16 memmove +#define move32 memmove +#else static void memmove_words(void* dest, const void* src, size_t n) { assert((((uintptr_t) dest | (uintptr_t) src | n) & 0x01) == 0); @@ -177,6 +181,7 @@ static void memmove_words(void* dest, const void* src, size_t n) { #define move16 memmove_words #define move32 memmove_words +#endif /* * public static void arraycopy(Object src, int srcPos, Object dest, |
