[fpc-devel] implementation AVX for Intel/AMD Prozessors

Torsten fckama at freenet.de
Sun Sep 18 10:54:09 CEST 2011


Hi,

im starting with implementation of AVX (Intel/AMD) in fpc-assemblercode.

I use in first step a external assembler (linux "as"). In this case, it 
is easy to use XMM-Register (max. 3 parameter) (only change the file 
"x86ins.dat", examble:

[VMOVDQA]
(Ch All, Ch None, Ch None)
xmmreg, xmmrm             \361\...


For use of YMM-Register i have change the file "x86reg.dat"


NR_YMM0,$07000000,ymm0,%ymm0,ymm0,ymm0,21,21,17,OT_YMMREG,0
NR_YMM1,$07000001,ymm1,%ymm1,ymm1,ymm1,22,22,18,OT_YMMREG,1
NR_YMM2,$07000002,ymm2,%ymm2,ymm2,ymm2,23,23,19,OT_YMMREG,2
NR_YMM3,$07000003,ymm3,%ymm3,ymm3,ymm3,24,24,20,OT_YMMREG,3
NR_YMM4,$07000004,ymm4,%ymm4,ymm4,ymm4,25,25,21,OT_YMMREG,4
NR_YMM5,$07000005,ymm5,%ymm5,ymm5,ymm5,26,26,22,OT_YMMREG,5
NR_YMM6,$07000006,ymm6,%ymm6,ymm6,ymm6,27,27,23,OT_YMMREG,6
NR_YMM7,$07000007,ymm7,%ymm7,ymm7,ymm7,28,28,24,OT_YMMREG,7
NR_YMM8,$07000008,ymm8,%ymm8,ymm8,ymm8,-1,-1,25,OT_YMMREG,0,64
NR_YMM9,$07000009,ymm9,%ymm9,ymm9,ymm9,-1,-1,26,OT_YMMREG,1,64
NR_YMM10,$0700000a,ymm10,%ymm10,ymm10,ymm10,-1,-1,27,OT_YMMREG,2,64
NR_YMM11,$0700000b,ymm11,%ymm11,ymm11,ymm11,-1,-1,28,OT_YMMREG,3,64
NR_YMM12,$0700000c,ymm12,%ymm12,ymm12,ymm12,-1,-1,29,OT_YMMREG,4,64
NR_YMM13,$0700000d,ymm13,%ymm13,ymm13,ymm13,-1,-1,30,OT_YMMREG,5,64
NR_YMM14,$0700000e,ymm14,%ymm14,ymm14,ymm14,-1,-1,31,OT_YMMREG,6,64
NR_YMM15,$0700000f,ymm15,%ymm15,ymm15,ymm15,-1,-1,32,OT_YMMREG,7,64

Next step is change the files "cpubase, cgbase, aasmcpu, ...".
What do i consider?


Regards
Torsten





More information about the fpc-devel mailing list