+ being able to define change information for xmm0

* corrected change information for SHA256RNDS2
This commit is contained in:
florian 2021-10-10 22:54:08 +02:00
parent 64db584eef
commit 07413be8b5
6 changed files with 89 additions and 57 deletions

View File

@ -1440,7 +1440,7 @@
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1, Ch_RXMM0]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1])
);

View File

@ -1454,7 +1454,7 @@
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1, Ch_RXMM0]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1])
);

View File

@ -346,7 +346,13 @@ interface
Ch_RRAX, Ch_RRCX, Ch_RRDX, Ch_RRBX, Ch_RRSP, Ch_RRBP, Ch_RRSI, Ch_RRDI,
Ch_WRAX, Ch_WRCX, Ch_WRDX, Ch_WRBX, Ch_WRSP, Ch_WRBP, Ch_WRSI, Ch_WRDI,
Ch_RWRAX, Ch_RWRCX, Ch_RWRDX, Ch_RWRBX, Ch_RWRSP, Ch_RWRBP, Ch_RWRSI, Ch_RWRDI,
Ch_MRAX, Ch_MRCX, Ch_MRDX, Ch_MRBX, Ch_MRSP, Ch_MRBP, Ch_MRSI, Ch_MRDI
Ch_MRAX, Ch_MRCX, Ch_MRDX, Ch_MRBX, Ch_MRSP, Ch_MRBP, Ch_MRSI, Ch_MRDI,
{ xmm register }
Ch_RXMM0,
Ch_WXMM0,
Ch_RWXMM0,
Ch_MXMM0
);
TInsProp = packed record

View File

@ -541,59 +541,74 @@ unit aoptx86;
end;
with insprop[p.opcode] do
begin
if getregtype(reg)=R_INTREGISTER then
begin
case getsupreg(reg) of
RS_EAX:
if [Ch_REAX,Ch_RWEAX,Ch_MEAX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_ECX:
if [Ch_RECX,Ch_RWECX,Ch_MECX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EDX:
if [Ch_REDX,Ch_RWEDX,Ch_MEDX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EBX:
if [Ch_REBX,Ch_RWEBX,Ch_MEBX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_ESP:
if [Ch_RESP,Ch_RWESP,Ch_MESP]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EBP:
if [Ch_REBP,Ch_RWEBP,Ch_MEBP]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_ESI:
if [Ch_RESI,Ch_RWESI,Ch_MESI]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EDI:
if [Ch_REDI,Ch_RWEDI,Ch_MEDI]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
case getregtype(reg) of
R_INTREGISTER:
begin
case getsupreg(reg) of
RS_EAX:
if [Ch_REAX,Ch_RWEAX,Ch_MEAX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_ECX:
if [Ch_RECX,Ch_RWECX,Ch_MECX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EDX:
if [Ch_REDX,Ch_RWEDX,Ch_MEDX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EBX:
if [Ch_REBX,Ch_RWEBX,Ch_MEBX]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_ESP:
if [Ch_RESP,Ch_RWESP,Ch_MESP]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EBP:
if [Ch_REBP,Ch_RWEBP,Ch_MEBP]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_ESI:
if [Ch_RESI,Ch_RWESI,Ch_MESI]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
RS_EDI:
if [Ch_REDI,Ch_RWEDI,Ch_MEDI]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
end;
end;
end;
R_MMREGISTER:
begin
case getsupreg(reg) of
RS_XMM0:
if [Ch_RXMM0,Ch_RWXMM0,Ch_MXMM0]*Ch<>[] then
begin
RegReadByInstruction := true;
exit
end;
end;
end;
else
;
end;
if SuperRegistersEqual(reg,NR_DEFAULTFLAGS) then
begin
if (Ch_RFLAGScc in Ch) and not(getsubreg(reg) in [R_SUBW,R_SUBD,R_SUBQ]) then
@ -723,6 +738,17 @@ unit aoptx86;
if result then
exit;
end
else if getregtype(reg)=R_MMREGISTER then
begin
case getsupreg(reg) of
RS_XMM0:
result:=([Ch_RXMM0,Ch_WXMM0,Ch_RWXMM0,Ch_MXMM0]*insprop[taicpu(p1).opcode].Ch)<>[];
else
;
end;
if result then
exit;
end
else if SuperRegistersEqual(reg,NR_DEFAULTFLAGS) then
begin
if ([Ch_RFlags,Ch_WFlags,Ch_RWFlags,Ch_RFLAGScc]*insprop[taicpu(p1).opcode].Ch)<>[] then

View File

@ -9158,7 +9158,7 @@ xmmreg,xmmrm \3\x0F\x38\xC\110
[SHA256RNDS2]
; reads also xmm0 !
(Ch_Mop2, Ch_Rop1)
(Ch_Mop2, Ch_Rop1, Ch_RXMM0)
xmmreg,xmmrm \3\x0F\x38\xCB\110 SHA
[SHA256MSG1]

View File

@ -1436,7 +1436,7 @@
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1, Ch_RXMM0]),
(Ch: [Ch_Mop2, Ch_Rop1]),
(Ch: [Ch_Mop2, Ch_Rop1])
);