Skip to content

Commit c132cf3

Browse files
committed
gas64 fix : optimization prevented converting 32bit memory/register
1 parent edee975 commit c132cf3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/compiler/ir-gas64.bas

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,13 @@ private sub check_optim(byref code as string)
711711

712712
if part2=prevpart1 then
713713
if part1=prevpart2 then
714-
'asm_info("OPTIMIZATION 1")
715-
code="#O1 "+code
714+
if instr(part2,"[")<>0 and (right(part1,1)="d" or part1[0]=asc("e")) then
715+
''to avoid issue if after 64bit register is used with xmm
716+
writepos=len(ctx.proc_txt)+len(code)+9
717+
code="#O1"+code+newline+string( ctx.indent*3, 32 )+"and "+part1+" ,0xFFFFFFFF"
718+
else
719+
code="#O1 "+code
720+
End If
716721
else
717722
if prevpart2="" then ''todo remove me after fixed
718723
asm_error("prev/part empty "+"part1="+part1+" part2="+part2+" prevpart1="+prevpart1+" prevpart2="+prevpart2)

0 commit comments

Comments
 (0)