Browse Source

* probably check type for int_to_real instruction selection

florian 3 years ago
parent
commit
0978f6ce16
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/x86/nx86cnv.pas

+ 2 - 2
compiler/x86/nx86cnv.pas

@@ -274,12 +274,12 @@ implementation
             if UseAVX then
             if UseAVX then
               case location.size of
               case location.size of
                 OS_F32:
                 OS_F32:
-                  if is_signed(left.resultdef) then
+                  if torddef(left.resultdef).ordtype in [s32bit,s64bit] then
                     op:=A_VCVTSI2SS
                     op:=A_VCVTSI2SS
                   else
                   else
                     op:=A_VCVTUSI2SS;
                     op:=A_VCVTUSI2SS;
                 OS_F64:
                 OS_F64:
-                  if is_signed(left.resultdef) then
+                  if torddef(left.resultdef).ordtype in [s32bit,s64bit] then
                     op:=A_VCVTSI2SD
                     op:=A_VCVTSI2SD
                   else
                   else
                     op:=A_VCVTUSI2SD;
                     op:=A_VCVTUSI2SD;