Browse Source

* OP_DIV shouldn't be used directly, not all cpu CGs support it

git-svn-id: trunk@1533 -
florian 20 years ago
parent
commit
d43f2fb2d4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/ncginl.pas

+ 1 - 1
compiler/ncginl.pas

@@ -351,7 +351,7 @@ implementation
            hregister:=cg.makeregsize(exprasmlist,left.location.register,OS_INT);
            cg.a_load_ref_reg(exprasmlist,OS_INT,OS_INT,href,hregister);
            if is_widestring(left.resulttype.def) then
-             cg.a_op_const_reg(exprasmlist,OP_IDIV,OS_INT,cwidechartype.def.size,hregister);
+             cg.a_op_const_reg(exprasmlist,OP_SHR,OS_INT,1,hregister);
            cg.a_label(exprasmlist,lengthlab);
            location_reset(location,LOC_REGISTER,OS_INT);
            location.register:=hregister;