mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 01:08:07 +02:00
* x86 AT&T reader and writer: cleaned up usage of attsufMM suffix:
* It is now only used to select size of vector instructions (i.e. 128 or 256 bits) * Scalar instructions reverted to use attsufINT suffix (selecting between 32 or 64 bits). * Additionally, vcvtsi2sd and vcvtsi2ss with rm64 operand are x86_64 only. git-svn-id: trunk@34942 -
This commit is contained in:
parent
3b665ddea2
commit
870fda34d5
@ -411,7 +411,7 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufINT,
|
||||
@ -528,7 +528,7 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
@ -708,8 +708,8 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ don't edit, this file is generated from x86ins.dat }
|
||||
1953;
|
||||
1951;
|
||||
|
@ -8981,13 +8981,6 @@
|
||||
code : #220#242#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge or if_sd
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SD;
|
||||
ops : 3;
|
||||
optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
|
||||
code : #220#242#243#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SS;
|
||||
ops : 3;
|
||||
@ -8995,13 +8988,6 @@
|
||||
code : #219#242#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge or if_sd
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SS;
|
||||
ops : 3;
|
||||
optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
|
||||
code : #219#242#243#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSS2SD;
|
||||
ops : 3;
|
||||
|
@ -411,7 +411,7 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufINT,
|
||||
@ -528,7 +528,7 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
@ -708,8 +708,8 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ don't edit, this file is generated from x86ins.dat }
|
||||
1985;
|
||||
1983;
|
||||
|
@ -9009,13 +9009,6 @@
|
||||
code : #220#242#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge or if_sd
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SD;
|
||||
ops : 3;
|
||||
optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
|
||||
code : #220#242#243#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SS;
|
||||
ops : 3;
|
||||
@ -9023,13 +9016,6 @@
|
||||
code : #219#242#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge or if_sd
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SS;
|
||||
ops : 3;
|
||||
optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
|
||||
code : #219#242#243#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSS2SD;
|
||||
ops : 3;
|
||||
|
@ -347,39 +347,7 @@ interface
|
||||
(getregtype(taicpu(hp).oper[0]^.reg)=R_FPUREGISTER)
|
||||
) then
|
||||
begin
|
||||
if (gas_needsuffix[op] = AttSufMM)then
|
||||
begin
|
||||
for i:=0 to taicpu(hp).ops-1 do
|
||||
begin
|
||||
|
||||
if (taicpu(hp).oper[i]^.typ = top_ref) then
|
||||
begin
|
||||
case taicpu(hp).oper[i]^.ot and OT_SIZE_MASK of
|
||||
OT_BITS32: begin
|
||||
owner.writer.AsmWrite(gas_opsize2str[S_L]);
|
||||
break;
|
||||
end;
|
||||
OT_BITS64: begin
|
||||
owner.writer.AsmWrite(gas_opsize2str[S_Q]);
|
||||
break;
|
||||
end;
|
||||
OT_BITS128: begin
|
||||
owner.writer.AsmWrite(gas_opsize2str[S_XMM]);
|
||||
break;
|
||||
end;
|
||||
OT_BITS256: begin
|
||||
owner.writer.AsmWrite(gas_opsize2str[S_YMM]);
|
||||
break;
|
||||
end;
|
||||
0: begin
|
||||
owner.writer.AsmWrite(gas_opsize2str[taicpu(hp).opsize]);
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else owner.writer.AsmWrite(gas_opsize2str[taicpu(hp).opsize]);
|
||||
owner.writer.AsmWrite(gas_opsize2str[taicpu(hp).opsize]);
|
||||
end;
|
||||
|
||||
{ process operands }
|
||||
|
@ -63,7 +63,7 @@ interface
|
||||
'','BW','BL','WL','BQ','WQ',{'LQ',}'B','W','L','S','Q','T','X','Y'
|
||||
);
|
||||
att_sizesuffix : array[0..13] of topsize = (
|
||||
S_NO,S_BW,S_BL,S_WL,S_BQ,S_WQ,{S_LQ,}S_B,S_W,S_L,S_NO,S_Q,S_NO,S_XMM,S_YMM
|
||||
S_NO,S_BW,S_BL,S_WL,S_BQ,S_WQ,{S_LQ,}S_B,S_W,S_L,S_NO,S_Q,S_NO,S_NO,S_NO
|
||||
);
|
||||
att_sizefpusuffix : array[0..13] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,{S_NO,}S_NO,S_NO,S_FL,S_FS,S_NO,S_FX,S_NO,S_NO
|
||||
@ -71,6 +71,9 @@ interface
|
||||
att_sizefpuintsuffix : array[0..13] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,{S_NO,}S_NO,S_NO,S_IL,S_IS,S_IQ,S_NO,S_NO,S_NO
|
||||
);
|
||||
att_sizemmsuffix : array[0..13] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,{S_NO,}S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_XMM,S_YMM
|
||||
);
|
||||
{$else x86_64}
|
||||
gas_opsize2str : array[topsize] of string[2] = ('',
|
||||
'b','w','l','q','bw','bl','wl',
|
||||
@ -87,7 +90,7 @@ interface
|
||||
'','BW','BL','WL','B','W','L','S','Q','T','X','Y'
|
||||
);
|
||||
att_sizesuffix : array[0..11] of topsize = (
|
||||
S_NO,S_BW,S_BL,S_WL,S_B,S_W,S_L,S_NO,S_NO,S_NO,S_XMM,S_YMM
|
||||
S_NO,S_BW,S_BL,S_WL,S_B,S_W,S_L,S_NO,S_NO,S_NO,S_NO,S_NO
|
||||
);
|
||||
att_sizefpusuffix : array[0..11] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_FL,S_FS,S_NO,S_FX,S_NO,S_NO
|
||||
@ -95,6 +98,10 @@ interface
|
||||
att_sizefpuintsuffix : array[0..11] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_IL,S_IS,S_IQ,S_NO,S_NO,S_NO
|
||||
);
|
||||
att_sizemmsuffix : array[0..11] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_XMM,S_YMM
|
||||
);
|
||||
|
||||
{$endif x86_64}
|
||||
|
||||
|
||||
|
@ -918,6 +918,8 @@ Implementation
|
||||
actopsize:=att_sizefpusuffix[sufidx]
|
||||
else if gas_needsuffix[actopcode]=attsufFPUint then
|
||||
actopsize:=att_sizefpuintsuffix[sufidx]
|
||||
else if gas_needsuffix[actopcode]=attsufMM then
|
||||
actopsize:=att_sizemmsuffix[sufidx]
|
||||
else
|
||||
actopsize:=att_sizesuffix[sufidx];
|
||||
{ only accept suffix from the same category that the opcode belongs to }
|
||||
@ -942,11 +944,9 @@ Implementation
|
||||
if Cond=Upper(cond2str[cnd]) then
|
||||
begin
|
||||
actopcode:=CondASmOp[j];
|
||||
if gas_needsuffix[actopcode]=attsufFPU then
|
||||
actopsize:=att_sizefpusuffix[sufidx]
|
||||
else if gas_needsuffix[actopcode]=attsufFPUint then
|
||||
actopsize:=att_sizefpuintsuffix[sufidx]
|
||||
else
|
||||
{ conditional instructions (cmovcc, setcc) use only INT suffixes;
|
||||
other stuff like fcmovcc is represented as group of individual instructions }
|
||||
if gas_needsuffix[actopcode]=attsufINT then
|
||||
actopsize:=att_sizesuffix[sufidx];
|
||||
{ only accept suffix from the same category that the opcode belongs to }
|
||||
if (actopsize<>S_NO) or (suflen=0) then
|
||||
|
@ -2224,7 +2224,7 @@ xmmreg,mmxrm \331\2\x0F\x2A\110 KATMAI,SSE,MMX
|
||||
mmxreg,mem64 \331\2\x0F\x2D\110 KATMAI,SSE,MMX
|
||||
mmxreg,xmmreg \331\2\x0F\x2D\110 KATMAI,SSE,MMX
|
||||
|
||||
[CVTSI2SS,cvtsi2ssM]
|
||||
[CVTSI2SS,cvtsi2ssX]
|
||||
(Ch_Wop2, Ch_Rop1, Ch_None)
|
||||
xmmreg,rm32 \333\321\2\x0F\x2A\110 KATMAI,SSE
|
||||
xmmreg,rm64 \333\321\2\x0F\x2A\110 KATMAI,SSE,X86_64
|
||||
@ -2761,7 +2761,7 @@ reg64,mem64 \334\320\2\x0F\x2D\110 WILLAMETTE,SSE2,X86_64
|
||||
xmmreg,xmmreg \334\2\x0F\x5A\110 WILLAMETTE,SSE2 ;,SQ
|
||||
xmmreg,mem64 \334\2\x0F\x5A\110 WILLAMETTE,SSE2 ;,SQ
|
||||
|
||||
[CVTSI2SD,cvtsi2sdM]
|
||||
[CVTSI2SD,cvtsi2sdX]
|
||||
(Ch_Wop2, Ch_Rop1, Ch_None)
|
||||
xmmreg,rm32 \334\2\x0F\x2A\110 WILLAMETTE,SSE2
|
||||
xmmreg,rm64 \326\334\321\2\x0F\x2A\110 WILLAMETTE,SSE2,X86_64
|
||||
@ -3652,15 +3652,15 @@ reg64,xmmreg \334\362\363\370\1\x2D\110 AVX,SA
|
||||
xmmreg,xmmreg,mem64 \334\362\370\1\x5A\75\120 AVX,SANDYBRIDGE
|
||||
xmmreg,xmmreg,xmmreg \334\362\370\1\x5A\75\120 AVX,SANDYBRIDGE
|
||||
|
||||
[VCVTSI2SD,vcvtsi2sdM]
|
||||
[VCVTSI2SD,vcvtsi2sdX]
|
||||
(Ch_Wop3, Ch_Rop2, Ch_Rop1)
|
||||
xmmreg,xmmreg,rm32 \334\362\370\1\x2A\75\120 AVX,SANDYBRIDGE,SD
|
||||
xmmreg,xmmreg,rm64 \334\362\363\370\1\x2A\75\120 AVX,SANDYBRIDGE
|
||||
xmmreg,xmmreg,rm64 \334\362\363\370\1\x2A\75\120 AVX,SANDYBRIDGE,X86_64
|
||||
|
||||
[VCVTSI2SS,vcvtsi2ssM]
|
||||
[VCVTSI2SS,vcvtsi2ssX]
|
||||
(Ch_Wop3, Ch_Rop2, Ch_Rop1)
|
||||
xmmreg,xmmreg,rm32 \333\362\370\1\x2A\75\120 AVX,SANDYBRIDGE,SD
|
||||
xmmreg,xmmreg,rm64 \333\362\363\370\1\x2A\75\120 AVX,SANDYBRIDGE
|
||||
xmmreg,xmmreg,rm64 \333\362\363\370\1\x2A\75\120 AVX,SANDYBRIDGE,X86_64
|
||||
|
||||
[VCVTSS2SD]
|
||||
(Ch_Wop3, Ch_Rop2, Ch_Rop1)
|
||||
|
@ -396,7 +396,7 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufINT,
|
||||
@ -513,7 +513,7 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
@ -702,8 +702,8 @@ attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
attsufMM,
|
||||
attsufINT,
|
||||
attsufINT,
|
||||
attsufNONE,
|
||||
attsufNONE,
|
||||
attsufMM,
|
||||
|
@ -9091,7 +9091,7 @@
|
||||
ops : 3;
|
||||
optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
|
||||
code : #220#242#243#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge
|
||||
flags : if_avx or if_sandybridge or if_x86_64
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSI2SS;
|
||||
@ -9105,7 +9105,7 @@
|
||||
ops : 3;
|
||||
optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
|
||||
code : #219#242#243#248#1#42#61#80;
|
||||
flags : if_avx or if_sandybridge
|
||||
flags : if_avx or if_sandybridge or if_x86_64
|
||||
),
|
||||
(
|
||||
opcode : A_VCVTSS2SD;
|
||||
|
Loading…
Reference in New Issue
Block a user