- implemented vector operations. Vectors are now fully working as local variables.

- removed mulv_kr and divv_kr instructions. The first are redundant and the second are useless. Maybe remove all other vector/const operations as well? They won't get used by the code generator.
- fixed disassembly of vector multiplication and division instructions.
This commit is contained in:
Christoph Oelckers 2016-10-29 01:39:25 +02:00
commit e5878f0cb2
5 changed files with 193 additions and 62 deletions

View file

@ -117,6 +117,9 @@
#define RVRVRV MODE_AV | MODE_BV | MODE_CV
#define RVRVKV MODE_AV | MODE_BV | MODE_CKV
#define RVKVRV MODE_AV | MODE_BKV | MODE_CV
#define RVRVRF MODE_AV | MODE_BV | MODE_CF
#define RVRVKF MODE_AV | MODE_BV | MODE_CKF
#define RVKVRF MODE_AV | MODE_BKV | MODE_CF
#define RFRV MODE_AF | MODE_BV | MODE_CUNUSED
#define I8RVRV MODE_AIMMZ | MODE_BV | MODE_CV
#define I8RVKV MODE_AIMMZ | MODE_BV | MODE_CKV

View file

@ -1352,11 +1352,6 @@ begin:
fc = konstf[C];
fbp = &reg.f[B];
goto Do_MULV2;
OP(MULVF2_KR):
ASSERTF(a+1); ASSERTKF(B+1); ASSERTF(C);
fc = reg.f[C];
fbp = &konstf[B];
goto Do_MULV2;
OP(DIVVF2_RR):
ASSERTF(a+1); ASSERTF(B+1); ASSERTF(C);
@ -1371,11 +1366,6 @@ begin:
fc = konstf[C];
fbp = &reg.f[B];
goto Do_DIVV2;
OP(DIVVF2_KR):
ASSERTF(a+1); ASSERTKF(B+1); ASSERTF(C);
fc = reg.f[C];
fbp = &konstf[B];
goto Do_DIVV2;
OP(LENV2):
ASSERTF(a); ASSERTF(B+1);
@ -1488,11 +1478,6 @@ begin:
fc = konstf[C];
fbp = &reg.f[B];
goto Do_MULV3;
OP(MULVF3_KR):
ASSERTF(a+2); ASSERTKF(B+2); ASSERTF(C);
fc = reg.f[C];
fbp = &konstf[B];
goto Do_MULV3;
OP(DIVVF3_RR):
ASSERTF(a+2); ASSERTF(B+2); ASSERTF(C);
@ -1508,11 +1493,6 @@ begin:
fc = konstf[C];
fbp = &reg.f[B];
goto Do_DIVV3;
OP(DIVVF3_KR):
ASSERTF(a+2); ASSERTKF(B+2); ASSERTF(C);
fc = reg.f[C];
fbp = &konstf[B];
goto Do_DIVV3;
OP(LENV3):
ASSERTF(a); ASSERTF(B+2);

View file

@ -208,12 +208,10 @@ xx(SUBV2_RK, subv2, RVRVKV),
xx(SUBV2_KR, subv2, RVKVRV),
xx(DOTV2_RR, dotv2, RVRVRV), // va = vB dot vkC
xx(DOTV2_RK, dotv2, RVRVKV),
xx(MULVF2_RR, mulv2, RVRVRV), // vA = vkB * fkC
xx(MULVF2_RK, mulv2, RVRVKV),
xx(MULVF2_KR, mulv2, RVKVRV),
xx(DIVVF2_RR, divv2, RVRVRV), // vA = vkB / fkC
xx(DIVVF2_RK, divv2, RVRVKV),
xx(DIVVF2_KR, divv2, RVKVRV),
xx(MULVF2_RR, mulv2, RVRVRF), // vA = vkB * fkC
xx(MULVF2_RK, mulv2, RVRVKF),
xx(DIVVF2_RR, divv2, RVRVRF), // vA = vkB / fkC
xx(DIVVF2_RK, divv2, RVRVKF),
xx(LENV2, lenv2, RFRV), // fA = vB.Length
xx(EQV2_R, beqv2, CVRR), // if ((vB == vkC) != A) then pc++ (inexact if A & 32)
xx(EQV2_K, beqv2, CVRK),
@ -230,12 +228,10 @@ xx(DOTV3_RK, dotv3, RVRVKV),
xx(CROSSV_RR, crossv, RVRVRV), // vA = vkB cross vkC
xx(CROSSV_RK, crossv, RVRVKV),
xx(CROSSV_KR, crossv, RVKVRV),
xx(MULVF3_RR, mulv3, RVRVRV), // vA = vkB * fkC
xx(MULVF3_RK, mulv3, RVRVKV),
xx(MULVF3_KR, mulv3, RVKVRV),
xx(DIVVF3_RR, divv3, RVRVRV), // vA = vkB / fkC
xx(DIVVF3_RK, divv3, RVRVKV),
xx(DIVVF3_KR, divv3, RVKVRV),
xx(MULVF3_RR, mulv3, RVRVRF), // vA = vkB * fkC
xx(MULVF3_RK, mulv3, RVRVKF),
xx(DIVVF3_RR, divv3, RVRVRF), // vA = vkB / fkC
xx(DIVVF3_RK, divv3, RVRVKF),
xx(LENV3, lenv3, RFRV), // fA = vB.Length
xx(EQV3_R, beqv3, CVRR), // if ((vB == vkC) != A) then pc++ (inexact if A & 33)
xx(EQV3_K, beqv3, CVRK),