From: Luke Kenneth Casson Leighton Date: Tue, 15 Jun 2021 14:53:41 +0000 (+0100) Subject: SVP64 mp3 assembler almost correct X-Git-Tag: xlen-bcd~458 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd84db15aae3bdad8157f2d596d8be3f0314ddef;p=openpower-isa.git SVP64 mp3 assembler almost correct lkcl@fizzy:~/src/libresoc/openpower-isa/media$ diff -u /tmp/x1 /tmp/x2 --- /tmp/x1 2021-06-15 15:51:06.016530558 +0100 +++ /tmp/x2 2021-06-15 15:51:16.816549772 +0100 @@ -2,7 +2,7 @@ 00000010 91 38 c2 aa b0 65 00 2a ec 4d ea 2a c6 99 f3 ab |.8...e.*.M.*....| 00000020 5e 86 5c 2b c7 79 ce aa 05 b1 30 ab c2 b7 35 2c |^.\+.y....0...5,| 00000030 b2 48 35 ab 00 d8 91 2b 26 7e 6c 2b 52 c9 ac ac |.H5....+&~l+R...| -00000040 00 00 00 00 fc 57 cf 2c 61 ee ce ab 00 3a ff ab |.....W.,a....:..| +00000040 00 00 00 80 fc 57 cf 2c 61 ee ce ab 00 3a ff ab |.....W.,a....:..| 00000050 42 b6 f1 2b d2 49 08 ad 46 dd 5c 2c b9 f3 0d 2c |B..+.I..F.\,...,| 00000060 2c 2d b3 ac 8d 26 55 2d ec 4d ea ac 0b 6c 08 ac |,-...&U-.M...l..| 00000070 2c a3 e6 2c 52 97 db ac a8 7c 03 2d 1d b3 58 ac |,..,R....|.-..X.| --- diff --git a/media/audio/mp3/mp3_0_apply_window_float_basicsv.s b/media/audio/mp3/mp3_0_apply_window_float_basicsv.s index 9ae5f721..c75cb574 100644 --- a/media/audio/mp3/mp3_0_apply_window_float_basicsv.s +++ b/media/audio/mp3/mp3_0_apply_window_float_basicsv.s @@ -50,6 +50,10 @@ ff_mpadsp_apply_window_float_sv: mulli 0, incr, 31 add out2, out, 0 + # set predicate mask (for taking out one add in mapreduce) + addi 30, 0, 127 # 127 = 0b0111_1111 - 7 bits + + # set Vector Length setvl 0, 0, 7, 1, 1 # setvli MVL=8, VL=8 # sv.addi win2, win, 124 @@ -59,7 +63,9 @@ ff_mpadsp_apply_window_float_sv: # SUM8(MACS, sum, w, p) # sv.lfs/els fv0.v, 256(win) # sv.lfs/els fv1.v, 256(p) - # sv.fmuls/mr sum, fv0.v, fv1.v + # TODO sv.fmadds/mr sum, fv0.v, fv1.v + # sv.fmuls fv0.v, fv0.v, fv1.v + # sv.fadds/mr/m=r30 sum, fv0.v, sum lfiwax tmpsum, 0, 9 # zero it addi p, buf, 192 @@ -67,7 +73,9 @@ ff_mpadsp_apply_window_float_sv: # SUM8(MLSS, sum, w + 32, p) # sv.lfs/els fv0.v, 256(win) # sv.lfs/els fv1.v, 256(p) - # sv.fmuls/mr tmpsum, fv0.v, fv1.v + # TODO sv.fmadds/mr tmpsum, fv0.v, fv1.v + # sv.fmuls fv0.v, fv0.v, fv1.v + # sv.fadds/mr/m=r30 tmpsum, fv0.v, tmpsum fsubs sum, sum, tmpsum subi win, win, 128 @@ -89,8 +97,12 @@ ff_mpadsp_apply_window_float_sv: # sv.lfs/els fv0.v, 256(p) # sv.lfs/els fv1.v, 256(win) # sv.lfs/els fv2.v, 256(win2) - # sv.fmuls/mr sum, fv0.v, fv1.v - # sv.fmuls/mr sum2, fv0.v, fv2.v + # TODO sv.fmadds/mr sum, fv0.v, fv1.v + # sv.fmuls fv1.v, fv0.v, fv1.v + # sv.fadds/mr/m=r30 sum, fv1.v, sum + # TODO sv.fmadds/mr sum2, fv0.v, fv2.v + # sv.fmuls fv0.v, fv0.v, fv2.v + # sv.fadds/mr/m=r30 sum2, fv0.v, sum2 fneg sum2, sum2 addi p, buf, 192 @@ -104,8 +116,12 @@ ff_mpadsp_apply_window_float_sv: # sv.lfs/els fv0.v, 256(p) # sv.lfs/els fv1.v, 256(win) # sv.lfs/els fv2.v, 256(win2) - # sv.fmuls/mr tmpsum, fv0.v, fv1.v - # sv.fmuls/mr tmpsum2, fv0.v, fv2.v + # TODO sv.fmadds/mr tmpsum, fv0.v, fv1.v + # sv.fmuls fv1.v, fv0.v, fv1.v + # sv.fadds/mr/m=r30 tmpsum, fv1.v, tmpsum + # TODO sv.fmadds/mr tmpsum2, fv0.v, fv2.v + # sv.fmuls fv0.v, fv0.v, fv2.v + # sv.fadds/mr/m=r30 tmpsum2, fv0.v, tmpsum2 fsubs sum, sum, tmpsum fsubs sum2, sum2, tmpsum2 @@ -128,7 +144,9 @@ ff_mpadsp_apply_window_float_sv: # SUM8(MLSS, sum, w + 32, p) # sv.lfs/els fv0.v, 256(win) # sv.lfs/els fv1.v, 256(p) - # sv.fmuls/mr sum, fv0.v, fv1.v + # TODO sv.fmadds/mr sum, fv0.v, fv1.v + # sv.fmuls fv0.v, fv0.v, fv1.v + # sv.fadds/mr/m=r30 sum, fv0.v, sum fneg sum, sum stfs sum, 0(out)