Browse Source

* Fixed tcgarm.a_load_ref_reg to load word values from location with alignment 2 using unaligned load.

git-svn-id: trunk@10754 -
yury 17 years ago
parent
commit
88597d23c5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/arm/cgcpu.pas

+ 2 - 2
compiler/arm/cgcpu.pas

@@ -877,7 +877,7 @@ unit cgcpu;
            else
            else
              InternalError(200308297);
              InternalError(200308297);
          end;
          end;
-         if (ref.alignment in [1,2]) and (ref.alignment<tcgsize2size[tosize]) then
+         if (ref.alignment in [1,2]) and (ref.alignment<tcgsize2size[fromsize]) then
            begin
            begin
              if target_info.endian=endian_big then
              if target_info.endian=endian_big then
                dir:=-1
                dir:=-1
@@ -1036,7 +1036,7 @@ unit cgcpu;
          instr: taicpu;
          instr: taicpu;
          conv_done: boolean;
          conv_done: boolean;
        begin
        begin
-         if (tcgsize2size[fromsize]>32) or (tcgsize2size[tosize]>32) then
+         if (tcgsize2size[fromsize]>32) or (tcgsize2size[tosize]>32) or (fromsize=OS_NO) or (tosize=OS_NO) then
            internalerror(2002090901);
            internalerror(2002090901);
 
 
          conv_done:=false;
          conv_done:=false;