📄 scalar.nas
字号:
;; (C) Frank Klemm 1995,99,2000; Dedicated to the LAME project;; %include "nasm.h" segment_code ; float_t scalar04_float32_i387 ( ; const float32_t* const p, ; const float32_t* const q );proc scalar04_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 endprocproc scalar08_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 fld dword [eax + 16] fmul dword [edx + 16] faddp st1,st0 fld dword [eax + 20] fmul dword [edx + 20] faddp st1,st0 fld dword [eax + 24] fmul dword [edx + 24] faddp st1,st0 fld dword [eax + 28] fmul dword [edx + 28] faddp st1,st0 endprocproc scalar12_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 fld dword [eax + 16] fmul dword [edx + 16] faddp st1,st0 fld dword [eax + 20] fmul dword [edx + 20] faddp st1,st0 fld dword [eax + 24] fmul dword [edx + 24] faddp st1,st0 fld dword [eax + 28] fmul dword [edx + 28] faddp st1,st0 fld dword [eax + 32] fmul dword [edx + 32] faddp st1,st0 fld dword [eax + 36] fmul dword [edx + 36] faddp st1,st0 fld dword [eax + 40] fmul dword [edx + 40] faddp st1,st0 fld dword [eax + 44] fmul dword [edx + 44] faddp st1,st0 endprocproc scalar16_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 fld dword [eax + 16] fmul dword [edx + 16] faddp st1,st0 fld dword [eax + 20] fmul dword [edx + 20] faddp st1,st0 fld dword [eax + 24] fmul dword [edx + 24] faddp st1,st0 fld dword [eax + 28] fmul dword [edx + 28] faddp st1,st0 fld dword [eax + 32] fmul dword [edx + 32] faddp st1,st0 fld dword [eax + 36] fmul dword [edx + 36] faddp st1,st0 fld dword [eax + 40] fmul dword [edx + 40] faddp st1,st0 fld dword [eax + 44] fmul dword [edx + 44] faddp st1,st0 fld dword [eax + 48] fmul dword [edx + 48] faddp st1,st0 fld dword [eax + 52] fmul dword [edx + 52] faddp st1,st0 fld dword [eax + 56] fmul dword [edx + 56] faddp st1,st0 fld dword [eax + 60] fmul dword [edx + 60] faddp st1,st0 endprocproc scalar20_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 fld dword [eax + 16] fmul dword [edx + 16] faddp st1,st0 fld dword [eax + 20] fmul dword [edx + 20] faddp st1,st0 fld dword [eax + 24] fmul dword [edx + 24] faddp st1,st0 fld dword [eax + 28] fmul dword [edx + 28] faddp st1,st0 fld dword [eax + 32] fmul dword [edx + 32] faddp st1,st0 fld dword [eax + 36] fmul dword [edx + 36] faddp st1,st0 fld dword [eax + 40] fmul dword [edx + 40] faddp st1,st0 fld dword [eax + 44] fmul dword [edx + 44] faddp st1,st0 fld dword [eax + 48] fmul dword [edx + 48] faddp st1,st0 fld dword [eax + 52] fmul dword [edx + 52] faddp st1,st0 fld dword [eax + 56] fmul dword [edx + 56] faddp st1,st0 fld dword [eax + 60] fmul dword [edx + 60] faddp st1,st0 fld dword [eax + 64] fmul dword [edx + 64] faddp st1,st0 fld dword [eax + 68] fmul dword [edx + 68] faddp st1,st0 fld dword [eax + 72] fmul dword [edx + 72] faddp st1,st0 fld dword [eax + 76] fmul dword [edx + 76] faddp st1,st0 endprocproc scalar24_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 fld dword [eax + 16] fmul dword [edx + 16] faddp st1,st0 fld dword [eax + 20] fmul dword [edx + 20] faddp st1,st0 fld dword [eax + 24] fmul dword [edx + 24] faddp st1,st0 fld dword [eax + 28] fmul dword [edx + 28] faddp st1,st0 fld dword [eax + 32] fmul dword [edx + 32] faddp st1,st0 fld dword [eax + 36] fmul dword [edx + 36] faddp st1,st0 fld dword [eax + 40] fmul dword [edx + 40] faddp st1,st0 fld dword [eax + 44] fmul dword [edx + 44] faddp st1,st0 fld dword [eax + 48] fmul dword [edx + 48] faddp st1,st0 fld dword [eax + 52] fmul dword [edx + 52] faddp st1,st0 fld dword [eax + 56] fmul dword [edx + 56] faddp st1,st0 fld dword [eax + 60] fmul dword [edx + 60] faddp st1,st0 fld dword [eax + 64] fmul dword [edx + 64] faddp st1,st0 fld dword [eax + 68] fmul dword [edx + 68] faddp st1,st0 fld dword [eax + 72] fmul dword [edx + 72] faddp st1,st0 fld dword [eax + 76] fmul dword [edx + 76] faddp st1,st0 fld dword [eax + 80] fmul dword [edx + 80] faddp st1,st0 fld dword [eax + 84] fmul dword [edx + 84] faddp st1,st0 fld dword [eax + 88] fmul dword [edx + 88] faddp st1,st0 fld dword [eax + 92] fmul dword [edx + 92] faddp st1,st0 endprocproc scalar32_float32_i387%$p arg 4%$q arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 fld dword [eax + 16] fmul dword [edx + 16] faddp st1,st0 fld dword [eax + 20] fmul dword [edx + 20] faddp st1,st0 fld dword [eax + 24] fmul dword [edx + 24] faddp st1,st0 fld dword [eax + 28] fmul dword [edx + 28] faddp st1,st0 fld dword [eax + 32] fmul dword [edx + 32] faddp st1,st0 fld dword [eax + 36] fmul dword [edx + 36] faddp st1,st0 fld dword [eax + 40] fmul dword [edx + 40] faddp st1,st0 fld dword [eax + 44] fmul dword [edx + 44] faddp st1,st0 fld dword [eax + 48] fmul dword [edx + 48] faddp st1,st0 fld dword [eax + 52] fmul dword [edx + 52] faddp st1,st0 fld dword [eax + 56] fmul dword [edx + 56] faddp st1,st0 fld dword [eax + 60] fmul dword [edx + 60] faddp st1,st0 fld dword [eax + 64] fmul dword [edx + 64] faddp st1,st0 fld dword [eax + 68] fmul dword [edx + 68] faddp st1,st0 fld dword [eax + 72] fmul dword [edx + 72] faddp st1,st0 fld dword [eax + 76] fmul dword [edx + 76] faddp st1,st0 fld dword [eax + 80] fmul dword [edx + 80] faddp st1,st0 fld dword [eax + 84] fmul dword [edx + 84] faddp st1,st0 fld dword [eax + 88] fmul dword [edx + 88] faddp st1,st0 fld dword [eax + 92] fmul dword [edx + 92] faddp st1,st0 fld dword [eax + 96] fmul dword [edx + 96] faddp st1,st0 fld dword [eax +100] fmul dword [edx +100] faddp st1,st0 fld dword [eax +104] fmul dword [edx +104] faddp st1,st0 fld dword [eax +108] fmul dword [edx +108] faddp st1,st0 fld dword [eax +112] fmul dword [edx +112] faddp st1,st0 fld dword [eax +116] fmul dword [edx +116] faddp st1,st0 fld dword [eax +120] fmul dword [edx +120] faddp st1,st0 fld dword [eax +124] fmul dword [edx +124] faddp st1,st0 endproc; float_t scalar4n_float32_i387 ( ; const float32_t* const p, ; const float32_t* const q,; const size_t len );proc scalar4n_float32_i387%$p arg 4%$q arg 4%$len arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] mov ecx,[sp(%$len)] fld dword [eax] fmul dword [edx] fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 dec ecx jz .ret1 add eax,byte 16 add edx,byte 16.lbl1 fld dword [eax] fmul dword [edx] faddp st1,st0 fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 fld dword [eax + 8] fmul dword [edx + 8] faddp st1,st0 fld dword [eax + 12] fmul dword [edx + 12] faddp st1,st0 add eax,byte 16 add edx,byte 16 dec ecx jnz .lbl1.ret1 endproc; float_t scalar1n_float32_i387 ( ; const float32_t* const p, ; const float32_t* const q,; const size_t len );proc scalar1n_float32_i387%$p arg 4%$q arg 4%$len arg 4;;; alloc mov eax,[sp(%$p)] mov edx,[sp(%$q)] mov ecx,[sp(%$len)] fld0 shr ecx,1 jnc .lbl2 fld dword [eax] fmul dword [edx] faddp st1,st0 add eax,byte 4 add edx,byte 4.lbl2 shr ecx,1 jnc .lbl3 fld dword [eax] fmul dword [edx] faddp st1,st0 fld dword [eax + 4] fmul dword [edx + 4] faddp st1,st0 add eax,byte 8 add edx,byte 8 and ecx,ecx.lbl3 jz .ret2.lbl4 fld dword [eax]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -