Skip to content

Commit

Permalink
gas64 : add ll suffixe in write bop to optimize mov with immediat value
Browse files Browse the repository at this point in the history
  • Loading branch information
SARG-FB committed Mar 2, 2024
1 parent 687d61a commit bb9527a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/ir-gas64.bas
Expand Up @@ -3808,7 +3808,7 @@ private sub hloadoperandsandwritebop(byval op as integer,byval v1 as IRVREG ptr,

if v2->typ=IR_VREGTYPE_IMM then
if op<>AST_OP_MUL orelse v2->value.i < -2 orelse v2->value.i > 10 then
if v2->value.i<-2147483648 or v2->value.i>=2147483648 then
if v2->value.i<-2147483648 or v2->value.i>=2147483648ll then
if v2->value.i>=0 and v2->value.i<4294967296 then
asm_code("mov eax, "+Str(v2->value.i))
else
Expand Down

0 comments on commit bb9527a

Please sign in to comment.