diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2016-09-19 14:36:16 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2016-09-19 14:36:16 +0000 |
commit | 27044e1770e79240a116c8d48ac0afc82b02de96 (patch) | |
tree | 7000548348091133055b35be51ddb44f35a11a81 /contrib/cortex-strings | |
parent | 09a53ad8f1318c5daae6cfb19d97f4f6459f0013 (diff) | |
download | src-test2-27044e1770e79240a116c8d48ac0afc82b02de96.tar.gz src-test2-27044e1770e79240a116c8d48ac0afc82b02de96.zip |
Notes
Diffstat (limited to 'contrib/cortex-strings')
-rw-r--r-- | contrib/cortex-strings/src/aarch64/memchr.S | 6 | ||||
-rw-r--r-- | contrib/cortex-strings/src/aarch64/strchr.S | 12 | ||||
-rw-r--r-- | contrib/cortex-strings/src/aarch64/strchrnul.S | 6 |
3 files changed, 15 insertions, 9 deletions
diff --git a/contrib/cortex-strings/src/aarch64/memchr.S b/contrib/cortex-strings/src/aarch64/memchr.S index 8da65ec232ac..a3492d4cef40 100644 --- a/contrib/cortex-strings/src/aarch64/memchr.S +++ b/contrib/cortex-strings/src/aarch64/memchr.S @@ -107,7 +107,7 @@ def_fn memchr and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ addp vend.16b, vend.16b, vend.16b /* 128->64 */ - mov synd, vend.2d[0] + mov synd, vend.d[0] /* Clear the soff*2 lower bits */ lsl tmp, soff, #1 lsr synd, synd, tmp @@ -127,7 +127,7 @@ def_fn memchr /* Use a fast check for the termination condition */ orr vend.16b, vhas_chr1.16b, vhas_chr2.16b addp vend.2d, vend.2d, vend.2d - mov synd, vend.2d[0] + mov synd, vend.d[0] /* We're not out of data, loop if we haven't found the character */ cbz synd, .Lloop @@ -137,7 +137,7 @@ def_fn memchr and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ addp vend.16b, vend.16b, vend.16b /* 128->64 */ - mov synd, vend.2d[0] + mov synd, vend.d[0] /* Only do the clear for the last possible block */ b.hi .Ltail diff --git a/contrib/cortex-strings/src/aarch64/strchr.S b/contrib/cortex-strings/src/aarch64/strchr.S index 2f94651584f3..860db10d3743 100644 --- a/contrib/cortex-strings/src/aarch64/strchr.S +++ b/contrib/cortex-strings/src/aarch64/strchr.S @@ -78,7 +78,13 @@ \f: .endm + .macro def_alias f a + .weak \a + .set \a,\f + .endm + def_fn strchr +def_alias strchr index /* Magic constant 0x40100401 to allow us to identify which lane matches the requested byte. Magic constant 0x80200802 used similarly for NUL termination. */ @@ -113,7 +119,7 @@ def_fn strchr addp vend1.16b, vend1.16b, vend2.16b // 128->64 lsr tmp1, tmp3, tmp1 - mov tmp3, vend1.2d[0] + mov tmp3, vend1.d[0] bic tmp1, tmp3, tmp1 // Mask padding bits. cbnz tmp1, .Ltail @@ -128,7 +134,7 @@ def_fn strchr orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b orr vend1.16b, vend1.16b, vend2.16b addp vend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] cbz tmp1, .Lloop /* Termination condition found. Now need to establish exactly why @@ -142,7 +148,7 @@ def_fn strchr addp vend1.16b, vend1.16b, vend2.16b // 256->128 addp vend1.16b, vend1.16b, vend2.16b // 128->64 - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] .Ltail: /* Count the trailing zeros, by bit reversing... */ rbit tmp1, tmp1 diff --git a/contrib/cortex-strings/src/aarch64/strchrnul.S b/contrib/cortex-strings/src/aarch64/strchrnul.S index 928f90d0869a..956aa5e9ff77 100644 --- a/contrib/cortex-strings/src/aarch64/strchrnul.S +++ b/contrib/cortex-strings/src/aarch64/strchrnul.S @@ -105,7 +105,7 @@ def_fn strchrnul addp vend1.16b, vend1.16b, vend1.16b // 128->64 lsr tmp1, tmp3, tmp1 - mov tmp3, vend1.2d[0] + mov tmp3, vend1.d[0] bic tmp1, tmp3, tmp1 // Mask padding bits. cbnz tmp1, .Ltail @@ -120,7 +120,7 @@ def_fn strchrnul orr vhas_chr2.16b, vhas_nul2.16b, vhas_chr2.16b orr vend1.16b, vhas_chr1.16b, vhas_chr2.16b addp vend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] cbz tmp1, .Lloop /* Termination condition found. Now need to establish exactly why @@ -130,7 +130,7 @@ def_fn strchrnul addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 addp vend1.16b, vend1.16b, vend1.16b // 128->64 - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] .Ltail: /* Count the trailing zeros, by bit reversing... */ rbit tmp1, tmp1 |