flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > macro sse math |
Author |
|
bitRAKE 24 Nov 2022, 01:19
|
|||
24 Nov 2022, 01:19 |
|
Roman 24 Nov 2022, 07:24
Thanks.
But i want easy write code and human-readable in fasm without godbolt |
|||
24 Nov 2022, 07:24 |
|
Roman 25 Nov 2022, 11:40
My first variant.
Code: macro xstt [arg] { forward xstt_eq equ arg common __c equ 0 irpv v,xstt_eq \{ rept 1 num:__c+1 \\{ v equ xmm\\#num movss v,[eax+\\#num*4-4] __c equ num \\} \} } macro xmov reg,[args] { forward match =*X, args \{ mulss xmm#reg, X \} match =+X, args \{ addss xmm#reg, X \} match =-X, args \{ subss xmm#reg, X \} match =/X, args \{ divss xmm#reg, X \} match =~X, args \{ comiss xmm#reg, X \} match =|X, args \{ movss X,xmm#reg \} } macro rstxs { irpv v,xstt_eq \{ restore xstt_eq \} } ;data zkk dd 4.0,2.0,3.0,5.0 mov eax,zkk xstt x1,y1,z1 ttt equ +x1 tt2 equ *y1 ttz equ /xmm5 ttr equ ~xmm5 xmov 1,ttt,tt2,ttz,ttr,wtr xmov 0,+x1,*y1,/xmm5,*y1 rstxs xstt r1,t1,w1 movss t1,xmm0 |
|||
25 Nov 2022, 11:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.