Browse Source

* fix i386 building after fb3c4ff75be75c367f4f4d505563475ef7accdb5

florian 1 year ago
parent
commit
fea8050457
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/x86/nx86inl.pas

+ 4 - 0
compiler/x86/nx86inl.pas

@@ -1749,6 +1749,7 @@ implementation
                  case paraarray[2].location.loc of
                  case paraarray[2].location.loc of
                    LOC_REFERENCE,LOC_CREFERENCE:
                    LOC_REFERENCE,LOC_CREFERENCE:
                      begin
                      begin
+{$ifdef x86_64}
                        { x86_64 only supports signed 32 bits constants directly }
                        { x86_64 only supports signed 32 bits constants directly }
                        if (opsize=S_Q) and
                        if (opsize=S_Q) and
                            ((paraarray[1].location.value<low(longint)) or (paraarray[1].location.value>high(longint))) then
                            ((paraarray[1].location.value<low(longint)) or (paraarray[1].location.value>high(longint))) then
@@ -1759,6 +1760,7 @@ implementation
                              tmpreg,paraarray[2].location.reference));
                              tmpreg,paraarray[2].location.reference));
                          end
                          end
                        else
                        else
+{$endif x86_64}
                          current_asmdata.CurrAsmList.concat(taicpu.op_const_ref(A_CMP,opsize,
                          current_asmdata.CurrAsmList.concat(taicpu.op_const_ref(A_CMP,opsize,
                            paraarray[1].location.value,paraarray[2].location.reference));
                            paraarray[1].location.value,paraarray[2].location.reference));
 
 
@@ -1766,6 +1768,7 @@ implementation
                      end;
                      end;
                    LOC_REGISTER,LOC_CREGISTER:
                    LOC_REGISTER,LOC_CREGISTER:
                      begin
                      begin
+{$ifdef x86_64}
                        { x86_64 only supports signed 32 bits constants directly }
                        { x86_64 only supports signed 32 bits constants directly }
                        if (opsize=S_Q) and
                        if (opsize=S_Q) and
                            ((paraarray[1].location.value<low(longint)) or (paraarray[1].location.value>high(longint))) then
                            ((paraarray[1].location.value<low(longint)) or (paraarray[1].location.value>high(longint))) then
@@ -1776,6 +1779,7 @@ implementation
                              tmpreg,paraarray[2].location.register));
                              tmpreg,paraarray[2].location.register));
                          end
                          end
                        else
                        else
+{$endif x86_64}
                          current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,opsize,
                          current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,opsize,
                            paraarray[1].location.value,paraarray[2].location.register));
                            paraarray[1].location.value,paraarray[2].location.register));