Browse Source

- Removed what's called "GAS bugfix" for VCVTDQ2PD instruction. Rationale:
o "Intel instruction set reference" states that source operand can be XMM register or memory, so GAS behavior
is correct. If any other assembler expects an YMM register, it must be fixed elsewhere.
o x86ins.dat does not allow YMM register as source operand for VCVTDQ2PD, and instructions are checked for validity
before writing them out, therefore this code was simply never executed.

git-svn-id: trunk@34924 -

sergei 8 years ago
parent
commit
8e55231640
1 changed files with 0 additions and 22 deletions
  1. 0 22
      compiler/x86/agx86att.pas

+ 0 - 22
compiler/x86/agx86att.pas

@@ -293,7 +293,6 @@ interface
        op       : tasmop;
        op       : tasmop;
        calljmp  : boolean;
        calljmp  : boolean;
        i        : integer;
        i        : integer;
-       sreg     : string;
       begin
       begin
         if hp.typ <> ait_instruction then
         if hp.typ <> ait_instruction then
           exit;
           exit;
@@ -301,27 +300,6 @@ interface
         op:=taicpu(hp).opcode;
         op:=taicpu(hp).opcode;
         calljmp:=is_calljmp(op);
         calljmp:=is_calljmp(op);
 
 
-        // BUGFIX GAS-assembler
-        // Intel "Intel 64 and IA-32 Architectures Software Developers manual 12/2011"
-        // Intel:       VCVTDQ2PD  YMMREG, YMMREG/mem128 ((intel syntax))
-        // GAS:         VCVTDQ2PD  YMMREG, XMMREG/mem128 ((intel syntax))
-        if (op = A_VCVTDQ2PD) and
-           (taicpu(hp).ops = 2) and
-           (taicpu(hp).oper[0]^.typ = top_reg) and
-           (taicpu(hp).oper[1]^.typ = top_reg) then
-        begin
-          if ((taicpu(hp).oper[0]^.ot and OT_YMMREG) = OT_YMMREG) and
-             ((taicpu(hp).oper[1]^.ot and OT_YMMREG) = OT_YMMREG) then
-          begin
-            // change registertype in oper[0] from OT_YMMREG to OT_XMMREG
-            taicpu(hp).oper[0]^.ot := taicpu(hp).oper[0]^.ot and not(OT_YMMREG) or OT_XMMREG;
-
-            sreg := gas_regname(taicpu(hp).oper[0]^.reg);
-            if (copy(sreg, 1, 2) = '%y') or
-               (copy(sreg, 1, 2) = '%Y') then
-              taicpu(hp).oper[0]^.reg := gas_regnum_search('%x' + copy(sreg, 3, length(sreg) - 2));
-          end;
-        end;
         { see fNoInterUnitMovQ declaration comment }
         { see fNoInterUnitMovQ declaration comment }
         if fNoInterUnitMovQ then
         if fNoInterUnitMovQ then
           begin
           begin