
'---------------
'MACRO OPERATORS
'===============

'PARTIAL DEMO / 32bit ASSEMBLER CODING

type simd
  float w,x,y,z
end type

  macro simd_"move" (a)
    movups xmm0,a
  end macro
  macro simd_"save" (a)
    movups a,xmm0
  end macro
  macro simd_"+" (a)
    movups xmm1,a
    addps xmm0,xmm1
  end macro
  macro simd_"-" (a)
    movups xmm1,a
    subps xmm0,xmm1
  end macro
  macro simd_"*" (a)
    movups xmm1,a
    mulps xmm0,xmm1
  end macro
  macro simd_"/" (a)
    movups xmm0,a
    divps xmm0,xmm1
  end macro


function str (simd*a) as string
  return a.w ", " a.x ", " a.y ", " a.z
end function
'

'TESTS
'#recordof simd_op
dim simd A={1,2,3,4}
dim simd B={10,20,30,40}
dim simd C[4]={100,200,300,400}
'
'a=b
'print str(A)
'print str(B)
print str(C)
print str(A+B)
print str(C*(A+B))



