Explorar o código

bugfix external gnu-assembler - special handling suffix vcvtpd.. destination operand = xmm =>> suffix x, destination ymm or zmm =>> no suffix

git-svn-id: branches/tg74/avx512-0037785@47145 -
tg74 %!s(int64=4) %!d(string=hai) anos
pai
achega
d8fa3dd4ed

+ 5 - 0
compiler/utils/mkx86ins.pp

@@ -320,6 +320,11 @@ begin
                     dec(attopcode[0]);
                     attsuffix:='attsufMM';
                   end;
+                'N' :
+                  begin
+                    dec(attopcode[0]);
+                    attsuffix:='attsufMMX';
+                  end;
                 'X' :
                   begin
                     dec(attopcode[0]);

+ 9 - 1
compiler/x86/itcpugas.pas

@@ -29,7 +29,7 @@ interface
       cgbase,cpubase;
 
     type
-      TAttSuffix = (AttSufNONE,AttSufINT,AttSufFPU,AttSufFPUint,AttSufINTdual,AttSufMM);
+      TAttSuffix = (AttSufNONE,AttSufINT,AttSufFPU,AttSufFPUint,AttSufINTdual,AttSufMM,AttSufMMX);
 
     const
       { include mnemonic strings }
@@ -75,6 +75,10 @@ interface
      att_sizemmsuffix : array[0..14] 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,S_ZMM
      );
+     att_sizemmxsuffix : array[0..14] 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_NO,S_NO
+     );
+
 {$else x86_64}
      gas_opsize2str : array[topsize] of string[2] = ('',
        'b','w','l','q','bw','bl','wl',
@@ -103,6 +107,10 @@ interface
      att_sizemmsuffix : array[0..12] 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,S_ZMM
      );
+     att_sizemmxsuffix : array[0..12] 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_NO,S_NO
+     );
+
 
 {$endif x86_64}
 

+ 1 - 1
compiler/x86/rax86.pas

@@ -239,7 +239,7 @@ begin
           ;
       end;
     end
-  else if gas_needsuffix[opcode]=AttSufMM then
+  else if gas_needsuffix[opcode] in [AttSufMM, AttSufMMX] then
   begin
     if (opr.typ=OPR_Reference) then
     begin

+ 2 - 0
compiler/x86/rax86att.pas

@@ -1041,6 +1041,8 @@ Implementation
                        actopsize:=att_sizefpuintsuffix[sufidx]
                       else if gas_needsuffix[actopcode]=attsufMM then
                        actopsize:=att_sizemmsuffix[sufidx]
+                      else if gas_needsuffix[actopcode]=attsufMMX then
+                       actopsize:=att_sizemmXsuffix[sufidx]
                       else
                        actopsize:=att_sizesuffix[sufidx];
                       { only accept suffix from the same category that the opcode belongs to }