Browse Source

* fix .seh_savereg: the offset is checked with a bitmask, not a divisor, so use "and", not "mod"

git-svn-id: trunk@39877 -
svenbarth 6 years ago
parent
commit
2f74a51eb8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/x86_64/rax64att.pas

+ 1 - 1
compiler/x86_64/rax64att.pas

@@ -185,7 +185,7 @@ Unit rax64att;
               Consume(AS_COMMA);
               Consume(AS_COMMA);
               hnum:=BuildConstExpression(false,false);
               hnum:=BuildConstExpression(false,false);
               if (hnum<0) or (hnum>maxoffset[actsehdirective=ash_setframe]) or
               if (hnum<0) or (hnum>maxoffset[actsehdirective=ash_setframe]) or
-                ((hnum mod modulo[actsehdirective=ash_setframe])<>0) then
+                ((hnum and modulo[actsehdirective=ash_setframe])<>0) then
                 Message1(asmr_e_bad_seh_directive_offset,sehdirectivestr[actsehdirective])
                 Message1(asmr_e_bad_seh_directive_offset,sehdirectivestr[actsehdirective])
               else
               else
                 curlist.concat(cai_seh_directive.create_reg_offset(actsehdirective,hreg,hnum));
                 curlist.concat(cai_seh_directive.create_reg_offset(actsehdirective,hreg,hnum));