when I define a SIMD style custom instruction like this
__MAC4(result0, result1, result2, result3, acc0, acc1, acc2, acc3, a0, a1, a2, a3, b0, b1, b2, b3)
the sementic is
resulti = acci + ai * bi;
the __MAC4 macro is defined as follow:
#define __MAC4(result0, result1, result2, result3, acc0, acc1, acc2, acc3, a0, a1, a2, a3, b0, b1, b2, b3) { \
__vexasm4 __mac_r ; \
__mac_r = _asm4(VEX_MAC4_ASMOP, acc0, acc1, acc2, acc3, a0, a1, a2, a3, b0, b1, b2, b3); \
result0 = __mac_r.n0; \
result1 = __mac_r.n1; \
result2 = __mac_r.n2; \
result3 = __mac_r.n3; \
}
the implementation of VEX_MAC4_ASMOP is omitted here.
when I compile the application C file,with option "
-ms -mas_G -fmm=risc.mm "
the compiler error message is
cc: /vex-3.39/lib/ccom: Core dump
cc: Fatal error in /vex-3.39/lib/ccom
cc: Terminated by segementation violation
------------------------------------
while I can define a MAC2 in same sementics but with less arguments, and compiled it correctly.
------------------------------------
is there any clue to solve this problem, or vex has some limitation on this kind of customization?
Thanks