Bladeren bron

* accesses to the ISA pointer are guaranteed to be aligned -> ensure the
code generator knows this

git-svn-id: trunk@29944 -

Jonas Maebe 10 jaren geleden
bovenliggende
commit
2c6e16e49e
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      compiler/nmem.pas

+ 5 - 1
compiler/nmem.pas

@@ -153,7 +153,7 @@ implementation
       globtype,systems,constexp,
       cutils,verbose,globals,
       symconst,symbase,defutil,defcmp,
-      nbas,nutils,
+      nbas,ninl,nutils,
       wpobase,
 {$ifdef i8086}
       cpuinfo,
@@ -258,6 +258,10 @@ implementation
                      result:=ctypeconvnode.create_internal(left,voidpointertype);
                      result:=cderefnode.create(result);
                      inserttypeconv_internal(result,resultdef);
+                     { the ISA pointer is guaranteed to be aligned, while
+                       dereferencing a void pointer is normally not aligned at
+                       all }
+                     result:=geninlinenode(in_aligned_x,false,result);
                      { reused }
                      left:=nil;
                    end