浏览代码

* 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 年之前
父节点
当前提交
88597d23c5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/arm/cgcpu.pas

+ 2 - 2
compiler/arm/cgcpu.pas

@@ -877,7 +877,7 @@ unit cgcpu;
            else
              InternalError(200308297);
          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
              if target_info.endian=endian_big then
                dir:=-1
@@ -1036,7 +1036,7 @@ unit cgcpu;
          instr: taicpu;
          conv_done: boolean;
        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);
 
          conv_done:=false;