1 /* Optimized memcpy implementation for cached memory on PowerPC64/POWER8.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
22 /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
26 ENTRY_TOCLESS (__memcpy_power8_cached, 5)
62 ble cr7,L(ge_16_le_32)
64 ble cr7,L(gt_32_le_64)
66 /* Align dst to 16 bytes. */
69 beq cr0,L(dst_is_align_16)
87 /* Main loop, copy 128 bytes each time. */
116 ble cr7,L(tail_le_64)
134 bgt cr7,L(tail_gt_32_le_64)
176 END_GEN_TB (__memcpy_power8_cached,TB_TOCLESS)