macro xmovs chA*,chB,[args,args2] { 
      common
      local .up

        a@1 equ al
        a@2 equ ax
        a@4 equ eax
        a@8 equ rax
        a@16 equ xmm0

        cmm@1 equ mov
        cmm@2 equ mov
        cmm@4 equ mov
        cmm@8 equ mov
        cmm@16 equ movups

         eff@ equ a@#chA

         cmm@ equ cmm@#chA


      xor ecx,ecx
.up:
      forward
 cmm@ eff@,[args+rcx]
      cmm@ [args2+rcx],eff@
      common
      add ecx,chA
      cmp ecx,chA*chB
      jb  .up

      } 
 macro xmfor xm,cnt { local .lb1
        _tmp_loop#xm equ  .lb1
        mov  eax,cnt#.0
        movd xmm#xm,eax
  .lb1:
        }
 macro xmnxt nmm {
       subss xmm#nmm,xmm15
       comiss xmm#nmm,xmm15
       jae   _tmp_loop#nmm
 }
 macro   for   ch0,ch2  { local  .molzz
        _xMet#ch0      EQU .molzz
        _xCyclNum#ch0  EQU ch2
        sub          ch0,ch0
        .molzz:
        }
macro   nxt chR  {   inc     chR
                cmp     chR,_xCyclNum#chR
                jb      _xMet#chR
        }
macro   memfor   ch0,ch2  {
        _xMet#ch0      EQU .moll#ch0
        mov          [ch0],ch2
        .moll#ch0:
        }
macro   memnxt chR  {   dec     [chR]
                cmp     [chR],0
                jnz      _xMet#chR
        }
;this _push get error Code cannot be generated
;macro _push reg {
;  if ~defined __tmpReg_#reg
;     jmp @f
;     __tmpReg_#reg dq 0
;     @@:
;  end if
;mov [__tmpReg_#reg],reg }
 macro _push redd {
  if ~ defined __tmpReg_rrr ;#reg
     __tmpReg_rrr EQU 1
     jmp @f
     irps reg, rax rcx rbx rdx rbp rsi rdi r8 r9 r10 r11 r12 r13 r14 r15 rsp \{
                __tmpReg_\#reg   dq 0   \}
     @@:
  end if
mov [__tmpReg_#redd],redd }
r1 EQU RAX
 r2 EQU RBX
 r3 EQU RCX
 r4 EQU RDX
 r5 EQU RDI
 r6 EQU RSI
 r7 EQU RBP
 macro xm2r chA*,cNum {
      ;match ==X, chA \{ movd xmm\#X,r\#X\#d \}
      match ==X, chA \{
      rept cNum n:\X \\{
      movq xmm\\#n,r\\#n \\} \}

      match =>X, chA \{
      rept cNum n:\X \\{
      movq r\\#n,xmm\\#n \\} \}
        }
macro EQU? chName,val { chName#? EQU val }
macro _pop reg { mov reg,[__tmpReg_#reg] }
struc ??? [args] { forward match name==value, args \{ \.\#name d\#value dup (0) \}
       common .End:
}
struc ??_ [args] { forward match name==value, args \{ \.\#name d\#value \}
       common .End:
}
macro ??? chName,[args] { common
          chName:
          forward match name==value, args \{ \.\#name d\#value dup (0) \}
          common
          chName#.End:
          chName#.size = chName#.End-chName
         }
macro ?x? chName,[args] { common
          chName:
          forward match name=>value, args \{ #name value \}
          ;common
          ;chName#.End:
          ;chName#.size = chName#.End-chName
         }
macro ! chSt {
      mov rcx,chSt
      call qword [chSt#.proc]
      }
;not work in match ? ! # &?
macro xmem mOut*, mInp*, [args] { common
 ;movss xmm0, [mInp]
 if `mInp eq '-'
 else if `mInp eq '&'
      movss xmm0,fxm_reg
 else
  movd xmm0,mInp
  end if
forward

 match =+X, args \{ addss xmm0, [X] \}
 match =-X, args \{ subss xmm0, [X] \}
 match =*X, args \{ mulss xmm0, [X] \}
 match =/X, args \{ divss xmm0, [X] \}
 match =|X, args \{ movss X,xmm0 \}
 match =&+X, args \{ addss xmm0,X \}
 match =&-X, args \{ subss xmm0,X \}
 match =&*X, args \{ mulss xmm0,X \}
 match =&/X, args \{ divss xmm0,X \}
 match =&>X, args \{ cvtss2si X,xmm0 \}
 match =~X, args \{ comiss xmm0, X \}
 match =&&X, args \{ X: \}
 match =)X, args \{ fxm_reg equ X \}
common
;movd mOut, xmm0
if `mOut eq '-'
 else
  movd mOut,xmm0
  end if
}



macro jif args& { restore jifR
  match ar1=,ar2=,mtk, args \{
     match =+X, ar1 \\{ inc X
                       jifR equ X\\}
     match =-X, ar1 \\{ dec X
                       jifR equ X\\}
     match =jifR, jifR \\{ jifR equ ar1 \\}
     match =>X, ar2 \\{ cmp jifR,X
                       ja mtk \\}
     match =<X, ar2 \\{ cmp jifR,X
                       jb mtk \\}
     match =~X, ar2 \\{ cmp jifR,X
                       jnz mtk \\}
     match ==X, ar2 \\{ cmp jifR,X
                       jz mtk \\}
 \} }

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 \}
                    match =>X, args \{ movss xmm#reg,X \}
                 }
