X86: Fix bugs in movd implementation.
Unfortunately my implementation of the movd instruction had two bugs. In one case, when moving a 32-bit value into an xmm register, the lower half of the xmm register was not zero extended. The other case is that xmm was used instead of xmmlm as the source for a register move. My test case didn't notice this at first as it moved xmm0 to eax, which both have the same register number.
This commit is contained in:
parent
e81cc233a6
commit
53e27c0277
1 changed files with 2 additions and 2 deletions
|
@ -357,7 +357,7 @@ def macroop MOVNTI_P_R {
|
|||
};
|
||||
|
||||
def macroop MOVD_XMM_R {
|
||||
mov2fp xmml, regm, srcSize=dsz, destSize=dsz
|
||||
mov2fp xmml, regm, srcSize=dsz, destSize=8
|
||||
lfpimm xmmh, 0
|
||||
};
|
||||
|
||||
|
@ -373,7 +373,7 @@ def macroop MOVD_XMM_P {
|
|||
};
|
||||
|
||||
def macroop MOVD_R_XMM {
|
||||
mov2int reg, xmml, size=dsz
|
||||
mov2int reg, xmmlm, size=dsz
|
||||
};
|
||||
|
||||
def macroop MOVD_M_XMM {
|
||||
|
|
Loading…
Reference in a new issue