diff options
author | Janne Grunau <janne-vlc@jannau.net> | 2018-10-25 22:13:18 +0300 |
---|---|---|
committer | Janne Grunau <janne-vlc@jannau.net> | 2018-10-25 23:10:51 +0300 |
commit | 36a2d2caa090cbcbedbca33dd207ccd9f9bee170 (patch) | |
tree | 7c0bde3d5140374f07146d0a2b064c0d5995774a /src/arm/64/mc.S | |
parent | e214351b0e485f68d0c7a03f726e8a694f0a8cbf (diff) |
arm: reverse jump tables
Instead of bit reverting the register subtract 24 from clz. This avoids
two empty filler values in the jump table with the same instruction
count.
Diffstat (limited to 'src/arm/64/mc.S')
-rw-r--r-- | src/arm/64/mc.S | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/arm/64/mc.S b/src/arm/64/mc.S index 69a4644..f5578dc 100644 --- a/src/arm/64/mc.S +++ b/src/arm/64/mc.S @@ -96,6 +96,7 @@ .macro bidir_fn type function \type\()_8bpc_neon, export=1 + clz w4, w4 .ifc \type, w_avg dup v30.8h, w6 neg v30.8h, v30.8h @@ -104,9 +105,8 @@ function \type\()_8bpc_neon, export=1 .ifc \type, mask movi v31.16b, #256-2 .endif - rbit w4, w4 adr x7, L(\type\()_tbl) - clz w4, w4 + sub w4, w4, #24 \type v4, v0, v1 ldrh w4, [x7, x4, lsl #1] \type v5, v2, v3 @@ -218,13 +218,12 @@ function \type\()_8bpc_neon, export=1 0: ret L(\type\()_tbl): - .hword 0, 0 - .hword L(\type\()_tbl) - 4b - .hword L(\type\()_tbl) - 8b - .hword L(\type\()_tbl) - 160b - .hword L(\type\()_tbl) - 320b - .hword L(\type\()_tbl) - 640b .hword L(\type\()_tbl) - 1280b + .hword L(\type\()_tbl) - 640b + .hword L(\type\()_tbl) - 320b + .hword L(\type\()_tbl) - 160b + .hword L(\type\()_tbl) - 8b + .hword L(\type\()_tbl) - 4b endfunc .endm |