|
12 | 12 | #include "hdr/stdint_proxy.h" |
13 | 13 | #include "src/__support/CPP/cstddef.h" |
14 | 14 | #include "src/__support/macros/config.h" |
| 15 | +#include "src/string/memory_utils/inline_memcpy.h" |
15 | 16 |
|
16 | 17 | namespace LIBC_NAMESPACE_DECL { |
17 | 18 | namespace internal { |
@@ -54,9 +55,9 @@ class ArrayGenericSize { |
54 | 55 | const cpp::byte *elem_i_block_end = elem_i + (elem_size - elem_size_rem); |
55 | 56 |
|
56 | 57 | while (elem_i != elem_i_block_end) { |
57 | | - __builtin_memcpy(tmp_block, elem_i, BLOCK_SIZE); |
58 | | - __builtin_memcpy(elem_i, elem_j, BLOCK_SIZE); |
59 | | - __builtin_memcpy(elem_j, tmp_block, BLOCK_SIZE); |
| 58 | + inline_memcpy(tmp_block, elem_i, BLOCK_SIZE); |
| 59 | + inline_memcpy(elem_i, elem_j, BLOCK_SIZE); |
| 60 | + inline_memcpy(elem_j, tmp_block, BLOCK_SIZE); |
60 | 61 |
|
61 | 62 | elem_i += BLOCK_SIZE; |
62 | 63 | elem_j += BLOCK_SIZE; |
@@ -112,9 +113,9 @@ template <size_t ELEM_SIZE> class ArrayFixedSize { |
112 | 113 | cpp::byte *elem_i = get_internal(i); |
113 | 114 | cpp::byte *elem_j = get_internal(j); |
114 | 115 |
|
115 | | - __builtin_memcpy(tmp, elem_i, ELEM_SIZE); |
| 116 | + inline_memcpy(tmp, elem_i, ELEM_SIZE); |
116 | 117 | __builtin_memmove(elem_i, elem_j, ELEM_SIZE); |
117 | | - __builtin_memcpy(elem_j, tmp, ELEM_SIZE); |
| 118 | + inline_memcpy(elem_j, tmp, ELEM_SIZE); |
118 | 119 | } |
119 | 120 |
|
120 | 121 | LIBC_INLINE size_t len() const { return array_len; } |
|
0 commit comments