Browse Source

* a few more MISP64 fixes

florian 3 years ago
parent
commit
9201047f31
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/mips/cgcpu.pas

+ 4 - 2
compiler/mips/cgcpu.pas

@@ -519,7 +519,7 @@ begin
   if (TCGSize2Size[fromsize] >= TCGSize2Size[tosize]) then
   if (TCGSize2Size[fromsize] >= TCGSize2Size[tosize]) then
     fromsize := tosize;
     fromsize := tosize;
   if (ref.alignment<>0) and
   if (ref.alignment<>0) and
-     (ref.alignment<tcgsize2size[fromsize]) then
+     (ref.alignment<min(tcgsize2size[fromsize],sizeof(aint))) then
      begin
      begin
        a_load_ref_reg_unaligned(list,FromSize,ToSize,ref,reg);
        a_load_ref_reg_unaligned(list,FromSize,ToSize,ref,reg);
        exit;
        exit;
@@ -1990,7 +1990,9 @@ end;
     procedure create_codegen;
     procedure create_codegen;
       begin
       begin
         cg:=TCGMIPS.Create;
         cg:=TCGMIPS.Create;
-{$ifndef mips64}
+{$ifdef mips64}
+        cg128:=tcg128.create;
+{$else mips64}
         cg64:=TCg64MPSel.Create;
         cg64:=TCg64MPSel.Create;
 {$endif mips64}
 {$endif mips64}
       end;
       end;