id stringlengths 22 129 | text stringlengths 60 19.5k | arch stringclasses 9
values | syntax stringclasses 5
values | kind stringclasses 4
values | repo stringclasses 32
values | path stringlengths 7 108 | license stringclasses 10
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 15
values | source_url stringlengths 85 192 | line_start int64 1 5.48k | line_end int64 4 5.5k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:2 | #define A_h x7
#define A_hw w7
#define B_l x8
#define B_lw w8
#define B_h x9
#define C_l x10
#define C_h x11
#define D_l x12
#define D_h x13
#define E_l src
#define E_h count
#define F_l srcend
#define F_h dst
#define G_l count
#define G_h dst
#define tmp1 x14
/* Copies are split into 3 main cases: small copies of up ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:3 | ENTRY_ALIGN (MEMMOVE, 6)
PTR_ARG (0)
PTR_ARG (1)
SIZE_ARG (2)
sub tmp1, dstin, src
cmp count, 96
ccmp tmp1, count, 2, hi
b.lo L(move_long)
/* Common case falls through into memcpy. */
END (MEMMOVE)
libc_hidden_builtin_def (MEMMOVE)
ENTRY (MEMCPY)
PTR_ARG (0)
PTR_ARG (1)
SIZE_ARG (2)
prfm PLDL1KEEP, [s... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:4 | stp A_l, A_h, [dstin]
stp D_l, D_h, [dstend, -16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(copy16):
cmp count, 8
b.lo 1f
ldr A_l, [src]
ldr A_h, [srcend, -8]
str A_l, [dstin]
str A_h, [dstend, -8]
ret
.p2align 4
1:
tbz count, 2, 1f
ldr A_lw, [src]
ldr A_hw, [srcend, -4]
str A_lw, [dstin]
str... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:5 | ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [src, 32]
ldp D_l, D_h, [src, 48]
ldp E_l, E_h, [srcend, -32]
ldp F_l, F_h, [srcend, -16]
stp A_l, A_h, [dstin]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstin, 32]
stp D_l, D_h, [dstin, 48]
stp E_l, E_h, [dstend, -32]
stp F_l, F_h, [dstend, -16]
ret
/* Align DST to 16 ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:6 | subs count, count, 128 + 16 /* Test and readjust count. */
L(prefetch_loop64):
tbz src, #6, 1f
prfm pldl1strm, [src, 512]
1:
stp A_l, A_h, [dst, 16]
ldp A_l, A_h, [src, 16]
stp B_l, B_h, [dst, 32]
ldp B_l, B_h, [src, 32]
stp C_l, C_h, [dst, 48]
ldp C_l, C_h, [src, 48]
stp D_l, D_h, [dst, 64]!
ldp D_l, D_h, ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 201 | 260 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:7 | ldp D_l, D_h, [src, 64]!
subs count, count, 64
b.hi L(loop64)
/* Write the last full set of 64 bytes. The remainder is at most 64
bytes, so it is safe to always copy 64 bytes from the end even if
there is just 1 byte left. */
L(last64):
ldp E_l, E_h, [srcend, -64]
stp A_l, A_h, [dst, 16]
ldp A_l, A_h, ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 241 | 300 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:8 | ldp B_l, B_h, [srcend, -32]
ldp C_l, C_h, [srcend, -48]
ldp D_l, D_h, [srcend, -64]!
sub dstend, dstend, tmp1
subs count, count, 128
b.ls 2f
nop
1:
stp A_l, A_h, [dstend, -16]
ldp A_l, A_h, [srcend, -16]
stp B_l, B_h, [dstend, -32]
ldp B_l, B_h, [srcend, -32]
stp C_l, C_h, [dstend, -48]
ldp C_l, C_h, [srce... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 281 | 322 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 581c785bf31bc74430320c7856bbfa3875d025fe | github | libc | https://github.com/bminor/glibc/blob/581c785bf31bc74430320c7856bbfa3875d025fe/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 2b778ceb4010c28d70de9b8eab20e8d88eed586b | github | libc | https://github.com/bminor/glibc/blob/2b778ceb4010c28d70de9b8eab20e8d88eed586b/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 45b1e17e9150dbd9ac2d578579063fbfa8e1b327 | github | libc | https://github.com/bminor/glibc/blob/45b1e17e9150dbd9ac2d578579063fbfa8e1b327/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:2 | #define A_h x7
#define A_hw w7
#define B_l x8
#define B_lw w8
#define B_h x9
#define C_l x10
#define C_h x11
#define D_l x12
#define D_h x13
#define E_l src
#define E_h count
#define F_l srcend
#define F_h dst
#define G_l count
#define G_h dst
#define tmp1 x14
/* Copies are split into 3 main cases: small copies of up ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:3 | ENTRY_ALIGN (MEMMOVE, 6)
DELOUSE (0)
DELOUSE (1)
DELOUSE (2)
sub tmp1, dstin, src
cmp count, 96
ccmp tmp1, count, 2, hi
b.lo L(move_long)
/* Common case falls through into memcpy. */
END (MEMMOVE)
libc_hidden_builtin_def (MEMMOVE)
ENTRY (MEMCPY)
DELOUSE (0)
DELOUSE (1)
DELOUSE (2)
prfm PLDL1KEEP, [src... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 5a82c74822d3272df2f5929133680478c0cfb4bd | github | libc | https://github.com/bminor/glibc/blob/5a82c74822d3272df2f5929133680478c0cfb4bd/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 75c1aee500ac95bde2b800b3d787c0dd805a8a82 | github | libc | https://github.com/bminor/glibc/blob/75c1aee500ac95bde2b800b3d787c0dd805a8a82/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:2 | #define A_h x7
#define A_hw w7
#define B_l x8
#define B_lw w8
#define B_h x9
#define C_l x10
#define C_h x11
#define D_l x12
#define D_h x13
#define E_l src
#define E_h count
#define F_l srcend
#define F_h dst
#define G_l count
#define G_h dst
#define tmp1 x14
/* Copies are split into 3 main cases: small copies of up ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:3 | # define MEMMOVE __memmove_thunderx
# define USE_THUNDERX
# endif
ENTRY_ALIGN (MEMMOVE, 6)
DELOUSE (0)
DELOUSE (1)
DELOUSE (2)
sub tmp1, dstin, src
cmp count, 96
ccmp tmp1, count, 2, hi
b.lo L(move_long)
/* Common case falls through into memcpy. */
END (MEMMOVE)
libc_hidden_builtin_def (MEMMOVE)
ENTRY (M... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:4 | stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstend, -32]
1:
stp A_l, A_h, [dstin]
stp D_l, D_h, [dstend, -16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(copy16):
cmp count, 8
b.lo 1f
ldr A_l, [src]
ldr A_h, [srcend, -8]
str A_l, [dstin]
str A_h, [dstend, -8]
ret
.p2align 4
1:
tbz count, 2, 1f
ldr ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:5 | /* Copy 64..96 bytes. Copy 64 bytes from the start and
32 bytes from the end. */
L(copy96):
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [src, 32]
ldp D_l, D_h, [src, 48]
ldp E_l, E_h, [srcend, -32]
ldp F_l, F_h, [srcend, -16]
stp A_l, A_h, [dstin]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstin, 32]
stp D_l, D_... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:6 | # elif defined(USE_THUNDERX2)
prfm pldl1strm, [src, 256]
# endif
add count, count, tmp1 /* Count is now 16 too large. */
ldp A_l, A_h, [src, 16]
stp D_l, D_h, [dstin]
ldp B_l, B_h, [src, 32]
ldp C_l, C_h, [src, 48]
ldp D_l, D_h, [src, 64]!
subs count, count, 128 + 16 /* Test and readjust count. */
L(prefet... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 201 | 260 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:7 | stp D_l, D_h, [dstin]
ldp B_l, B_h, [src, 32]
ldp C_l, C_h, [src, 48]
ldp D_l, D_h, [src, 64]!
subs count, count, 128 + 16 /* Test and readjust count. */
b.ls L(last64)
L(loop64):
stp A_l, A_h, [dst, 16]
ldp A_l, A_h, [src, 16]
stp B_l, B_h, [dst, 32]
ldp B_l, B_h, [src, 32]
stp C_l, C_h, [dst, 48]
ldp C_l,... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 241 | 300 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:8 | add srcend, src, count
add dstend, dstin, count
/* Align dstend to 16 byte alignment so that we don't cross cache line
boundaries on both loads and stores. There are at least 96 bytes
to copy, so copy 16 bytes unaligned and then align. The loop
copies 64 bytes per iteration and prefetches one iteration... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 281 | 336 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:9 | ldp A_l, A_h, [src, 32]
stp B_l, B_h, [dstend, -32]
ldp B_l, B_h, [src, 16]
stp C_l, C_h, [dstend, -48]
ldp C_l, C_h, [src]
stp D_l, D_h, [dstend, -64]
stp G_l, G_h, [dstin, 48]
stp A_l, A_h, [dstin, 32]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstin]
3: ret
END (MEMCPY)
libc_hidden_builtin_def (MEMCPY)
#end... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 321 | 336 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:2 | #define A_h x7
#define A_hw w7
#define B_l x8
#define B_lw w8
#define B_h x9
#define C_l x10
#define C_h x11
#define D_l x12
#define D_h x13
#define E_l src
#define E_h count
#define F_l srcend
#define F_h dst
#define G_l count
#define G_h dst
#define tmp1 x14
/* Copies are split into 3 main cases: small copies of up ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:3 | # define USE_THUNDERX
ENTRY_ALIGN (MEMMOVE, 6)
DELOUSE (0)
DELOUSE (1)
DELOUSE (2)
sub tmp1, dstin, src
cmp count, 96
ccmp tmp1, count, 2, hi
b.lo L(move_long)
/* Common case falls through into memcpy. */
END (MEMMOVE)
libc_hidden_builtin_def (MEMMOVE)
ENTRY (MEMCPY)
DELOUSE (0)
DELOUSE (1)
DELOUSE (2)... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:4 | 1:
stp A_l, A_h, [dstin]
stp D_l, D_h, [dstend, -16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(copy16):
cmp count, 8
b.lo 1f
ldr A_l, [src]
ldr A_h, [srcend, -8]
str A_l, [dstin]
str A_h, [dstend, -8]
ret
.p2align 4
1:
tbz count, 2, 1f
ldr A_lw, [src]
ldr A_hw, [srcend, -4]
str A_lw, [dstin]
... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:5 | L(copy96):
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [src, 32]
ldp D_l, D_h, [src, 48]
ldp E_l, E_h, [srcend, -32]
ldp F_l, F_h, [srcend, -16]
stp A_l, A_h, [dstin]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstin, 32]
stp D_l, D_h, [dstin, 48]
stp E_l, E_h, [dstend, -32]
stp F_l, F_h, [dstend, -16]
ret
/* Alig... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:6 | ldp B_l, B_h, [src, 32]
ldp C_l, C_h, [src, 48]
ldp D_l, D_h, [src, 64]!
subs count, count, 128 + 16 /* Test and readjust count. */
L(prefetch_loop64):
tbz src, #6, 1f
prfm pldl1strm, [src, 512]
1:
stp A_l, A_h, [dst, 16]
ldp A_l, A_h, [src, 16]
stp B_l, B_h, [dst, 32]
ldp B_l, B_h, [src, 32]
stp C_l, C_h, ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 201 | 260 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:7 | ldp B_l, B_h, [src, 32]
stp C_l, C_h, [dst, 48]
ldp C_l, C_h, [src, 48]
stp D_l, D_h, [dst, 64]!
ldp D_l, D_h, [src, 64]!
subs count, count, 64
b.hi L(loop64)
/* Write the last full set of 64 bytes. The remainder is at most 64
bytes, so it is safe to always copy 64 bytes from the end even if
there is j... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 241 | 300 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:8 | sub srcend, srcend, tmp1
sub count, count, tmp1
ldp A_l, A_h, [srcend, -16]
stp D_l, D_h, [dstend, -16]
ldp B_l, B_h, [srcend, -32]
ldp C_l, C_h, [srcend, -48]
ldp D_l, D_h, [srcend, -64]!
sub dstend, dstend, tmp1
subs count, count, 128
b.ls 2f
nop
1:
stp A_l, A_h, [dstend, -16]
ldp A_l, A_h, [srcend, -16]... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 281 | 326 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx.S:1 | /* A Thunderx Optimized memcpy implementation for AARCH64.
Copyright (C) 2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx.S | LGPL-2.1 | 6a2c695266fab34cc057256d1b33d2268183f00e | github | libc | https://github.com/bminor/glibc/blob/6a2c695266fab34cc057256d1b33d2268183f00e/sysdeps/aarch64/multiarch/memcpy_thunderx.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:2 | #define B_l x8
#define B_lw w8
#define B_h x9
#define C_l x10
#define C_h x11
#define D_l x12
#define D_h x13
#define E_l src
#define E_h count
#define F_l srcend
#define F_h dst
#define G_l count
#define G_h dst
#define tmp1 x14
#define A_q q0
#define B_q q1
#define C_q q2
#define D_q q3
#define E_q q4
#define F_q q5... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:3 | */
ENTRY (__memmove_thunderx2)
PTR_ARG (0)
PTR_ARG (1)
SIZE_ARG (2)
add srcend, src, count
cmp count, 16
b.ls L(memcopy16)
sub tmp1, dstin, src
cmp count, 96
ccmp tmp1, count, 2, hi
b.lo L(move_long)
END (__memmove_thunderx2)
/* Copies are split into 3 main cases: small copies of up to 16 bytes,
medi... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:4 | add dstend, dstin, count
and tmp1, src, 15
cmp count, 96
b.hi L(memcopy_long)
/* Medium copies: 17..96 bytes. */
ldr E_q, [srcend, -16]
cmp count, 64
b.gt L(memcpy_copy96)
cmp count, 48
b.le L(bytes_17_to_48)
/* 49..64 bytes */
ldp B_q, C_q, [src]
str E_q, [dstend, -16]
stp A_q, B_q, [dstin]
str C_q, [d... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:5 | ldr A_l, [src]
ldr A_h, [srcend, -8]
add dstend, dstin, count
str A_l, [dstin]
str A_h, [dstend, -8]
ret
.p2align 4
L(bytes_0_to_8):
tbz count, 2, L(bytes_0_to_3)
ldr A_lw, [src]
ldr A_hw, [srcend, -4]
add dstend, dstin, count
str A_lw, [dstin]
str A_hw, [dstend, -4]
ret
/* Copy 0..3 bytes. Use a branc... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:6 | /* Loaded 64 bytes, second 16-bytes chunk can be
overlapping with the first chunk by tmp1 bytes.
Stored 16 bytes. */
sub dst, dstin, tmp1
add count, count, tmp1
/* The range of count being [65..96] becomes [65..111]
after tmp [0..15] gets added to it,
count now is <bytes-left-to-load>+48 */
cmp coun... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 201 | 260 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:7 | ldp B_q, C_q, [src], #32
sub dst, dstin, tmp1
add count, count, tmp1
add dst, dst, 16
and tmp1, dst, 15
ldp D_q, E_q, [src], #32
str A_q, [dstin]
/* Already loaded 64+16 bytes. Check if at
least 64 more bytes left */
subs count, count, 64+64+16
b.lt L(loop128_exit0)
cmp count, MEMCPY_PREFETCH_LDR + 64 + ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 241 | 300 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:8 | subs count, count, 64
b.lt L(loop128_exit1)
ldp B_q, C_q, [src], #32
ldp D_q, E_q, [src], #32
stp F_q, G_q, [dst], #32
stp H_q, I_q, [dst], #32
subs count, count, 64
b.ge L(loop128)
L(loop128_exit0):
ldp F_q, G_q, [srcend, -64]
ldp H_q, I_q, [srcend, -32]
stp B_q, C_q, [dst], #32
stp D_q, E_q, [dst]
stp F_q... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 281 | 340 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:9 | Current state: tmp1 = dst % 16; C_q, D_q, E_q
contains data yet to be stored. src and dst points
to next-to-be-processed data. A_q, B_q contains
data already stored before, count = bytes left to
be load decremented by 64.
The control is passed here if at least 64 bytes left
to be loaded. The co... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 321 | 380 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:10 | ext H_v.16b, E_v.16b, F_v.16b, 16-shft;\
1:;\
stp A_q, B_q, [dst], #32;\
prfm pldl1strm, [src, MEMCPY_PREFETCH_LDR];\
ldp C_q, D_q, [src], #32;\
ext I_v.16b, F_v.16b, G_v.16b, 16-shft;\
stp H_q, I_q, [dst], #32;\
ext A_v.16b, G_v.16b, C_v.16b, 16-shft;\
ext B_v.16b, C_v.16b, D_v.16... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 361 | 420 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:11 | and tmp1, srcend, 15
ldr D_q, [srcend, -16]
sub srcend, srcend, tmp1
sub count, count, tmp1
ldp A_q, B_q, [srcend, -32]
str D_q, [dstend, -16]
ldp C_q, D_q, [srcend, -64]!
sub dstend, dstend, tmp1
subs count, count, 128
b.ls 2f
.p2align 4
1:
subs count, count, 64
stp A_q, B_q, [dstend, -32]
ldp A_q, B_q, ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 401 | 457 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:12 | actually used (could be any value). */
.word 0
.word L(ext_size_1) -.
.word L(ext_size_2) -.
.word L(ext_size_3) -.
.word L(ext_size_4) -.
.word L(ext_size_5) -.
.word L(ext_size_6) -.
.word L(ext_size_7) -.
.word L(ext_size_8) -.
.word L(ext_size_9) -.
.word L(ext_size_10) -.
.word L(ext_size_11) -.
.wor... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | dff8da6b3e89b986bb7f6b1ec18cf65d5972e307 | github | libc | https://github.com/bminor/glibc/blob/dff8da6b3e89b986bb7f6b1ec18cf65d5972e307/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 441 | 457 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 9fd3409842b3e2d31cff5dbd6f96066c430f0aa2 | github | libc | https://github.com/bminor/glibc/blob/9fd3409842b3e2d31cff5dbd6f96066c430f0aa2/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:3 | #ifndef MEMCPY
# define MEMCPY memcpy
#endif
#if IS_IN (libc)
#undef MEMCPY
#define MEMCPY __memcpy_thunderx2
#undef MEMMOVE
#define MEMMOVE __memmove_thunderx2
/* Overlapping large forward memmoves use a loop that copies backwards.
Otherwise memcpy is used. Small moves branch to memcopy16 directly.
The longe... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:4 | Large copies use the loops processing 64 bytes per iteration for
unaligned case and 128 bytes per iteration for aligned ones.
*/
#define MEMCPY_PREFETCH_LDR 640
.p2align 4
ENTRY (MEMCPY)
PTR_ARG (0)
PTR_ARG (1)
SIZE_ARG (2)
add srcend, src, count
cmp count, 16
b.ls L(memcopy16)
ldr A_q, [src], #16
add d... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:5 | str A_q, [dstin]
str E_q, [dstend, -16]
ret
L(bytes_32_to_48):
/* 32..48 */
ldr B_q, [src]
str A_q, [dstin]
str E_q, [dstend, -16]
str B_q, [dstin, 16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(memcopy16):
cmp count, 8
b.lo L(bytes_0_to_8)
ldr A_l, [src]
ldr A_h, [srcend, -8]
add dstend, dstin... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:6 | ldrb A_hw, [srcend, -1]
add dstend, dstin, count
ldrb B_lw, [src, tmp1]
strb B_lw, [dstin, tmp1]
strb A_hw, [dstend, -1]
strb A_lw, [dstin]
1:
ret
.p2align 4
L(memcpy_copy96):
/* Copying 65..96 bytes. A_q (first 16 bytes) and
E_q(last 16 bytes) are already loaded. The size
is large enough to benefit f... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 201 | 260 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:7 | stp D_q, G_q, [dst, 48]
str A_q, [dstin]
str E_q, [dstend, -16]
ret
L(copy96_large):
ldr F_q, [src, 64]
str B_q, [dst, 16]
stp C_q, D_q, [dst, 32]
stp G_q, F_q, [dst, 64]
str A_q, [dstin]
str E_q, [dstend, -16]
ret
.p2align 4
L(memcopy_long):
bic src, src, 15
ldp B_q, C_q, [src], #32
sub dst, dstin, tmp... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 241 | 300 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:8 | ldp H_q, I_q, [src], #32
prfm pldl1strm, [src, MEMCPY_PREFETCH_LDR]
ldp B_q, C_q, [src], #32
stp D_q, E_q, [dst], #32
ldp D_q, E_q, [src], #32
stp F_q, G_q, [dst], #32
stp H_q, I_q, [dst], #32
subs count, count, 128
b.ge L(loop128_prefetch)
add count, count, MEMCPY_PREFETCH_LDR + 64 + 32
.p2align 4
L(loop128... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 281 | 340 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:9 | ret
L(dst_unaligned_tail):
ldp C_q, D_q, [srcend, -64]
ldp E_q, F_q, [srcend, -32]
stp A_q, B_q, [dst], #32
stp H_q, I_q, [dst], #16
str G_q, [dst, tmp1]
stp C_q, D_q, [dstend, -64]
stp E_q, F_q, [dstend, -32]
ret
L(dst_unaligned):
/* For the unaligned store case the code loads two
aligned chunks and the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 321 | 380 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:10 | stp B_q, C_q, [dst], #32
bic dst, dst, 15
sub count, count, 32
adrp tmp2, L(ext_table)
add tmp2, tmp2, :lo12:L(ext_table)
add tmp2, tmp2, tmp1, LSL #2
ldr tmp3w, [tmp2]
add tmp2, tmp2, tmp3w, SXTW
br tmp2
.p2align 4
/* to make the loop in each chunk 16-bytes aligned */
nop
#define EXT_CHUNK(shft) \
L(ext_siz... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 361 | 420 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:11 | EXT_CHUNK(7)
EXT_CHUNK(8)
EXT_CHUNK(9)
EXT_CHUNK(10)
EXT_CHUNK(11)
EXT_CHUNK(12)
EXT_CHUNK(13)
EXT_CHUNK(14)
EXT_CHUNK(15)
L(move_long):
.p2align 4
1:
cbz tmp1, 3f
add srcend, src, count
add dstend, dstin, count
and tmp1, srcend, 15
ldr D_q, [srcend, -16]
sub srcend, srcend, tmp1
sub count, count, tmp1
ldp ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 401 | 460 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:12 | there is just 1 byte left. */
2:
ldp E_q, F_q, [src, 32]
ldp G_q, H_q, [src]
stp A_q, B_q, [dstend, -32]
stp C_q, D_q, [dstend, -64]
stp E_q, F_q, [dstin, 32]
stp G_q, H_q, [dstin]
3: ret
END (MEMCPY)
.section .rodata
.p2align 4
L(ext_table):
/* The first entry is for the alignment of 0 and is never
ac... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 6d7e8eda9b85b08f207a6dc6f187e94e4817270f | github | libc | https://github.com/bminor/glibc/blob/6d7e8eda9b85b08f207a6dc6f187e94e4817270f/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 441 | 477 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 581c785bf31bc74430320c7856bbfa3875d025fe | github | libc | https://github.com/bminor/glibc/blob/581c785bf31bc74430320c7856bbfa3875d025fe/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 2b778ceb4010c28d70de9b8eab20e8d88eed586b | github | libc | https://github.com/bminor/glibc/blob/2b778ceb4010c28d70de9b8eab20e8d88eed586b/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 45b1e17e9150dbd9ac2d578579063fbfa8e1b327 | github | libc | https://github.com/bminor/glibc/blob/45b1e17e9150dbd9ac2d578579063fbfa8e1b327/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:3 | #ifndef MEMCPY
# define MEMCPY memcpy
#endif
#if IS_IN (libc)
#undef MEMCPY
#define MEMCPY __memcpy_thunderx2
#undef MEMMOVE
#define MEMMOVE __memmove_thunderx2
/* Overlapping large forward memmoves use a loop that copies backwards.
Otherwise memcpy is used. Small moves branch to memcopy16 directly.
The longe... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:4 | Large copies use the loops processing 64 bytes per iteration for
unaligned case and 128 bytes per iteration for aligned ones.
*/
#define MEMCPY_PREFETCH_LDR 640
.p2align 4
ENTRY (MEMCPY)
DELOUSE (0)
DELOUSE (1)
DELOUSE (2)
add srcend, src, count
cmp count, 16
b.ls L(memcopy16)
ldr A_q, [src], #16
add ds... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 5a82c74822d3272df2f5929133680478c0cfb4bd | github | libc | https://github.com/bminor/glibc/blob/5a82c74822d3272df2f5929133680478c0cfb4bd/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 32e902a94e24fc5a00168d0df3301098704c61fb | github | libc | https://github.com/bminor/glibc/blob/32e902a94e24fc5a00168d0df3301098704c61fb/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:3 | #ifndef MEMCPY
# define MEMCPY memcpy
#endif
#if IS_IN (libc)
#undef MEMCPY
#undef MEMMOVE
#define MEMCPY __memcpy_thunderx2
#define MEMMOVE __memmove_thunderx2
/* Moves are split into 3 main cases: small copies of up to 16 bytes,
medium copies of 17..96 bytes which are fully unrolled. Large copies
of more th... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:4 | ldp A_l, A_h, [src]
tbnz tmp1, 6, L(copy96)
ldp D_l, D_h, [srcend, -16]
tbz tmp1, 5, 1f
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [srcend, -32]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstend, -32]
1:
stp A_l, A_h, [dstin]
stp D_l, D_h, [dstend, -16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(copy16):
... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:5 | strb A_lw, [dstin]
strb B_lw, [dstin, tmp1]
strb A_hw, [dstend, -1]
2: ret
.p2align 4
/* Copy 64..96 bytes. Copy 64 bytes from the start and
32 bytes from the end. */
L(copy96):
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [src, 32]
ldp D_l, D_h, [src, 48]
ldp E_l, E_h, [srcend, -32]
ldp F_l, F_h, [srcend, -16... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:6 | b.ls L(last64)
L(loop64):
stp A_l, A_h, [dst, 16]
ldp A_l, A_h, [src, 16]
stp B_l, B_h, [dst, 32]
ldp B_l, B_h, [src, 32]
stp C_l, C_h, [dst, 48]
ldp C_l, C_h, [src, 48]
stp D_l, D_h, [dst, 64]!
ldp D_l, D_h, [src, 64]!
subs count, count, 64
b.hi L(loop64)
/* Write the last full set of 64 bytes. The remain... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 201 | 260 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:7 | to copy, so copy 16 bytes unaligned and then align. The loop
copies 64 bytes per iteration and prefetches one iteration ahead. */
and tmp1, dstend, 15
ldp D_l, D_h, [srcend, -16]
sub srcend, srcend, tmp1
sub count, count, tmp1
ldp A_l, A_h, [srcend, -16]
stp D_l, D_h, [dstend, -16]
ldp B_l, B_h, [srcend, ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 241 | 300 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:8 | stp D_l, D_h, [dstend, -64]
stp G_l, G_h, [dstin, 48]
stp A_l, A_h, [dstin, 32]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstin]
3: ret
END (MEMMOVE)
libc_hidden_builtin_def (MEMMOVE)
/* Copies are split into 3 main cases: small copies of up to 16 bytes,
medium copies of 17..96 bytes which are fully unrolled. ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 281 | 340 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:9 | /* Medium copies: 17..96 bytes. */
ldr E_q, [srcend, -16]
cmp count, 64
b.gt L(memcpy_copy96)
cmp count, 48
b.le L(bytes_17_to_48)
/* 49..64 bytes */
ldp B_q, C_q, [src]
str E_q, [dstend, -16]
stp A_q, B_q, [dstin]
str C_q, [dstin, 32]
ret
L(bytes_17_to_48):
/* 17..48 byt... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 321 | 380 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:10 | ret
.p2align 4
L(bytes_0_to_8):
tbz count, 2, L(bytes_0_to_3)
ldr A_lw, [src]
ldr A_hw, [srcend, -4]
add dstend, dstin, count
str A_lw, [dstin]
str A_hw, [dstend, -4]
ret
/* Copy 0..3 bytes. Use a branchless sequence that copies the same
byte 3 times if count==1, or the 2nd byte ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 361 | 420 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:11 | Stored 16 bytes. */
sub dst, dstin, tmp1
add count, count, tmp1
/* The range of count being [65..96] becomes [65..111]
after tmp [0..15] gets added to it,
count now is <bytes-left-to-load>+48 */
cmp count, 80
b.gt L(copy96_medium)
ldr D_q, [src, 32]
stp B_q, C_q, [dst, 16]
str ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 401 | 460 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:12 | and tmp1, dst, 15
ldp D_q, E_q, [src], #32
str B_q, [dst], #16
/* Already loaded 64+16 bytes. Check if at
least 64 more bytes left */
subs count, count, 64+64+16
b.lt L(loop128_exit2)
cmp count, MEMCPY_PREFETCH_LDR + 64 + 32
b.lt L(loop128)
cbnz tmp1, L(dst_unaligned)
sub count, c... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 441 | 500 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:13 | stp E_q, F_q, [dst], #32
stp G_q, B_q, [dst], #32
subs count, count, 64
b.lt L(loop128_exit1)
L(loop128_proceed):
ldp B_q, C_q, [src], #32
str A_q, [dst], #16
ldp D_q, E_q, [src], #32
str B_q, [dst], #16
subs count, count, 64
b.ge L(loop128)
.p2align 4
L(loop128_exit2):
s... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 481 | 540 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:14 | aligned chunks and then merges them using ext
instruction. This can be up to 30% faster than
the the simple unaligned store access.
Current state: tmp1 = dst % 16; C_q, D_q, E_q
contains data yet to be stored. src and dst points
to next-to-be-processed data. A_q, B_q contains
data already store... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 521 | 580 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:15 | ext H_v.16b, E_v.16b, F_v.16b, 16-shft;\
1:;\
stp A_q, B_q, [dst], #32;\
prfm pldl1strm, [src, MEMCPY_PREFETCH_LDR];\
ldp C_q, D_q, [src], #32;\
ext I_v.16b, F_v.16b, G_v.16b, 16-shft;\
stp H_q, I_q, [dst], #32;\
ext A_v.16b, G_v.16b, C_v.16b, 16-shft;\
ext B_v.16b, C_v.16b, D_v.16... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 561 | 620 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:16 | END (MEMCPY)
.section .rodata
.p2align 4
L(ext_table):
/* The first entry is for the alignment of 0 and is never
actually used (could be any value). */
.word 0
.word L(ext_size_1) -.
.word L(ext_size_2) -.
.word L(ext_size_3) -.
.word L(ext_size_4) -.
.word L(ext_size_5) -.
.word L(ext_size_6) -.
.word... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 94e358f6d490650c714edb1ffc3a52f56ffe086e | github | libc | https://github.com/bminor/glibc/blob/94e358f6d490650c714edb1ffc3a52f56ffe086e/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 601 | 627 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:10 | ret
.p2align 4
L(bytes_0_to_8):
tbz count, 2, L(bytes_0_to_3)
ldr A_lw, [src]
ldr A_hw, [srcend, -4]
add dstend, dstin, count
str A_lw, [dstin]
str A_hw, [dstend, -4]
ret
/* Copy 0..3 bytes. Use a branchless sequence that copies the same
byte 3 times if count==1, or the 2nd byte ... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 361 | 420 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:11 | sub dst, dstin, tmp1
add count, count, tmp1
/* The range of count being [65..96] becomes [65..111]
after tmp [0..15] gets added to it,
count now is <bytes-left-to-load>+48 */
cmp count, 80
b.gt L(copy96_medium)
ldr D_q, [src, 32]
stp B_q, C_q, [dst, 16]
str E_q, [dstend, -16]
... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 401 | 460 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:12 | ldp D_q, E_q, [src], #32
str B_q, [dst], #16
/* Already loaded 64+16 bytes. Check if at
least 64 more bytes left */
subs count, count, 64+64+16
b.lt L(loop128_exit2)
cmp count, MEMCPY_PREFETCH_LDR + 64 + 32
b.lt L(loop128)
cbnz tmp1, L(dst_unaligned)
sub count, count, MEMCPY_PREFET... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 441 | 500 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:13 | stp G_q, B_q, [dst], #32
subs count, count, 64
b.lt L(loop128_exit1)
L(loop128_proceed):
ldp B_q, C_q, [src], #32
str A_q, [dst], #16
ldp D_q, E_q, [src], #32
str B_q, [dst], #16
subs count, count, 64
b.ge L(loop128)
.p2align 4
L(loop128_exit2):
stp C_q, D_q, [dst], #32
s... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 481 | 540 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:14 | instruction. This can be up to 30% faster than
the the simple unaligned store access.
Current state: tmp1 = dst % 16; C_q, D_q, E_q
contains data yet to be stored. src and dst points
to next-to-be-processed data. A_q, B_q contains
data already stored before, count = bytes left to
be load decrem... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 521 | 580 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:15 | 1:;\
stp A_q, B_q, [dst], #32;\
ext H_v.16b, E_v.16b, F_v.16b, 16-shft;\
ext I_v.16b, F_v.16b, G_v.16b, 16-shft;\
stp H_q, I_q, [dst], #16;\
add dst, dst, tmp1;\
str G_q, [dst], #16;\
b L(copy_long_check32);\
2:;\
stp A_q, B_q, [dst], #32;\
prfm pldl1strm, [src, MEMCPY_PREF... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 561 | 620 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | f0da0bcf8b270d08c172df42dfc3f2b9a9240973 | github | libc | https://github.com/bminor/glibc/blob/f0da0bcf8b270d08c172df42dfc3f2b9a9240973/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memcpy_thunderx2.S:1 | /* A Thunderx2 Optimized memcpy implementation for AARCH64.
Copyright (C) 2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memcpy_thunderx2.S | LGPL-2.1 | e9537dddc7c7c7b60b55ed845542c8d586164488 | github | libc | https://github.com/bminor/glibc/blob/e9537dddc7c7c7b60b55ed845542c8d586164488/sysdeps/aarch64/multiarch/memcpy_thunderx2.S | 1 | 27 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:1 | /* Copyright (C) 2017-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memmove_falkor.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:2 | #define F_q q17
#define G_q q23
/* RATIONALE:
The move has 4 distinct parts:
* Small moves of 16 bytes and under
* Medium sized moves of 17-96 bytes
* Large moves where the source address is higher than the destination
(forward copies)
* Large moves where the destination address is higher than the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memmove_falkor.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:3 | str A_q, [dstin]
str D_q, [dstend, -16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(copy16):
cmp count, 8
b.lo 1f
ldr A_x, [src]
ldr B_x, [srcend, -8]
str A_x, [dstin]
str B_x, [dstend, -8]
ret
.p2align 4
1:
/* 4-7 */
tbz count, 2, 1f
ldr A_w, [src]
ldr B_w, [srcend, -4]
str A_w, [dstin]
str B... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memmove_falkor.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:4 | .p2align 4
/* Copy 64..96 bytes. Copy 64 bytes from the start and
32 bytes from the end. */
L(copy96):
ldr B_q, [src, 16]
ldr C_q, [src, 32]
ldr D_q, [src, 48]
ldr E_q, [srcend, -32]
ldr F_q, [srcend, -16]
str A_q, [dstin]
str B_q, [dstin, 16]
str C_q, [dstin, 32]
str D_q, [dstin, 48]
str E_q, [dstend,... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memmove_falkor.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:5 | ldr A_q, [src, 16]!
b.hi L(loop64)
/* Write the last full set of 64 bytes. The remainder is at most 64
bytes and at least 33 bytes, so it is safe to always copy 64 bytes
from the end. */
L(last64):
ldr C_q, [srcend, -64]
str Q_q, [dst, 16]
ldr B_q, [srcend, -48]
str A_q, [dst, 32]
ldr A_q, [srcend, -3... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memmove_falkor.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:6 | subs count, count, 32
str Q_q, [dstend, -16]
ldr Q_q, [srcend, -16]!
str A_q, [dstend, -32]!
ldr A_q, [srcend, -16]!
b.hi 1b
/* Write the last full set of 64 bytes. The remainder is at most 64
bytes and at least 33 bytes, so it is safe to always copy 64 bytes
from the start. */
2:
ldr C_q, [src, 48]
... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | d614a7539657941a9201c236b2f15afac18e1213 | github | libc | https://github.com/bminor/glibc/blob/d614a7539657941a9201c236b2f15afac18e1213/sysdeps/aarch64/multiarch/memmove_falkor.S | 201 | 225 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:1 | /* Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 5a82c74822d3272df2f5929133680478c0cfb4bd | github | libc | https://github.com/bminor/glibc/blob/5a82c74822d3272df2f5929133680478c0cfb4bd/sysdeps/aarch64/multiarch/memmove_falkor.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:1 | /* Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 04277e02d7f54d3582bebcf8386b317018cd5e1d | github | libc | https://github.com/bminor/glibc/blob/04277e02d7f54d3582bebcf8386b317018cd5e1d/sysdeps/aarch64/multiarch/memmove_falkor.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:1 | /* Copyright (C) 2017-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | ce76a5cb8d3658cc4fc935cf774e8bb5836796dc | github | libc | https://github.com/bminor/glibc/blob/ce76a5cb8d3658cc4fc935cf774e8bb5836796dc/sysdeps/aarch64/multiarch/memmove_falkor.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:1 | /* Copyright (C) 2017-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 70c97f8493ab2a215c2543d78f212abb23f151ed | github | libc | https://github.com/bminor/glibc/blob/70c97f8493ab2a215c2543d78f212abb23f151ed/sysdeps/aarch64/multiarch/memmove_falkor.S | 1 | 60 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:2 | #define E_l src
#define E_h count
#define F_l srcend
#define F_h dst
#define tmp1 x14
/* Alias with A_l and A_h to train the prefetcher. */
#define Q_l x22
#define Q_h x23
/* RATIONALE:
The copy has 4 distinct parts:
* Small copies of 16 bytes and under
* Medium sized copies of 17-96 bytes
* Large copie... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 70c97f8493ab2a215c2543d78f212abb23f151ed | github | libc | https://github.com/bminor/glibc/blob/70c97f8493ab2a215c2543d78f212abb23f151ed/sysdeps/aarch64/multiarch/memmove_falkor.S | 41 | 100 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:3 | tbnz tmp1, 6, L(copy96)
ldp D_l, D_h, [srcend, -16]
tbz tmp1, 5, 1f
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [srcend, -32]
stp B_l, B_h, [dstin, 16]
stp C_l, C_h, [dstend, -32]
1:
stp A_l, A_h, [dstin]
stp D_l, D_h, [dstend, -16]
ret
.p2align 4
/* Small copies: 0..16 bytes. */
L(copy16):
cmp count, 8
b.lo 1... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 70c97f8493ab2a215c2543d78f212abb23f151ed | github | libc | https://github.com/bminor/glibc/blob/70c97f8493ab2a215c2543d78f212abb23f151ed/sysdeps/aarch64/multiarch/memmove_falkor.S | 81 | 140 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:4 | .p2align 4
1:
/* 0-1 */
tbz count, 0, 1f
ldrb A_lw, [src]
strb A_lw, [dstin]
1: ret
.p2align 4
/* Copy 64..96 bytes. Copy 64 bytes from the start and
32 bytes from the end. */
L(copy96):
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [src, 32]
ldp D_l, D_h, [src, 48]
ldp E_l, E_h, [srcend, -32]
ldp F_l, F_h, [... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 70c97f8493ab2a215c2543d78f212abb23f151ed | github | libc | https://github.com/bminor/glibc/blob/70c97f8493ab2a215c2543d78f212abb23f151ed/sysdeps/aarch64/multiarch/memmove_falkor.S | 121 | 180 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:5 | stp A_l, A_h, [dstin]
ldp A_l, A_h, [src, 16]!
subs count, count, 32 + 64 + 16 /* Test and readjust count. */
b.ls L(last64)
L(loop64):
subs count, count, 32
stp Q_l, Q_h, [dst, 16]
ldp Q_l, Q_h, [src, 16]!
stp A_l, A_h, [dst, 32]!
ldp A_l, A_h, [src, 16]!
b.hi L(loop64)
/* Write the last full set of 64 by... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 70c97f8493ab2a215c2543d78f212abb23f151ed | github | libc | https://github.com/bminor/glibc/blob/70c97f8493ab2a215c2543d78f212abb23f151ed/sysdeps/aarch64/multiarch/memmove_falkor.S | 161 | 220 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:6 | to copy, so copy 16 bytes unaligned and then align. The loop
copies 32 bytes per iteration and prefetches one iteration ahead. */
ldp A_l, A_h, [srcend, -16]
and tmp1, srcend, 15
sub srcend, srcend, tmp1
ldp Q_l, Q_h, [srcend, -16]!
stp A_l, A_h, [dstend, -16]
sub count, count, tmp1
ldp A_l, A_h, [srcend,... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 70c97f8493ab2a215c2543d78f212abb23f151ed | github | libc | https://github.com/bminor/glibc/blob/70c97f8493ab2a215c2543d78f212abb23f151ed/sysdeps/aarch64/multiarch/memmove_falkor.S | 201 | 242 |
bminor/glibc:sysdeps/aarch64/multiarch/memmove_falkor.S:4 | .p2align 4
1:
/* 0-1 */
tbz count, 0, 1f
ldrb A_lw, [src]
strb A_lw, [dstin]
1: ret
.p2align 4
/* Copy 64..96 bytes. Copy 64 bytes from the start and
32 bytes from the end. */
L(copy96):
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [src, 32]
ldp D_l, D_h, [src, 48]
ldp E_l, E_h, [srcend, -32]
ldp F_l, F_h, [... | arm64 | gas-like | handwritten | bminor/glibc | sysdeps/aarch64/multiarch/memmove_falkor.S | LGPL-2.1 | 688903eb3ef01301d239ab753d309d45720610a7 | github | libc | https://github.com/bminor/glibc/blob/688903eb3ef01301d239ab753d309d45720610a7/sysdeps/aarch64/multiarch/memmove_falkor.S | 121 | 180 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.