x86: implements the simd128 ADDSUBPD instruction

This patch implements the simd128 ADDSUBPD instruction for the x86 architecture.

Tested with a simple program in assembly language which executes the
instruction.  Checked that different versions of the instruction are executed
by using the execution tracing option.

Committed by: Nilay Vaish <nilay@cs.wisc.edu
This commit is contained in:
Maxime Martinasso 2015-01-03 17:51:48 -06:00
parent 02c376ac44
commit 5a5416d575
2 changed files with 21 additions and 2 deletions

View file

@ -903,7 +903,7 @@
}
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
0x0: WarnUnimpl::addsubpd_Vo_Wo();
0x0: ADDSUBPD(Vo,Wo);
0x1: PSRLW(Vo,Wo);
0x2: PSRLD(Vo,Wo);
0x3: PSRLQ(Vo,Wo);

View file

@ -37,5 +37,24 @@
microcode = '''
# ADDSUBPS
# ADDSUBPD
def macroop ADDSUBPD_XMM_XMM {
msubf xmml, xmml, xmmlm, size=8, ext=Scalar
maddf xmmh, xmmh, xmmhm, size=8, ext=Scalar
};
def macroop ADDSUBPD_XMM_M {
ldfp ufp1, seg, sib, disp, dataSize=8
ldfp ufp2, seg, sib, "DISPLACEMENT+8", dataSize=8
msubf xmmlm, xmml, ufp1, size=8, ext=0
maddf xmmhm, xmmh, ufp2, size=8, ext=0
};
def macroop ADDSUBPD_XMM_P {
rdip t7
ldfp ufp1, seg, sib, disp, dataSize=8
ldfp ufp2, seg, sib, "DISPLACEMENT+8", dataSize=8
msubf xmmlm, xmml, ufp1, size=8, ext=0
maddf xmmhm, xmmh, ufp2, size=8, ext=0
};
'''