Skip to content

Commit 283c3bd

Browse files
committed
gas64 : fix an issue when only one character after a comma in an asmline
1 parent 0540479 commit 283c3bd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/compiler/ir-gas64.bas

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ private sub check_optim(byref code as string)
411411
static as string prevpart1,prevpart2,prevmov
412412
static as long prevwpos,flag
413413
dim as long poschar1,poschar2,writepos
414-
414+
print code
415415
if len(code)=0 then
416416
prevpart1="":prevpart2="":prevmov="":flag=KUSE_MOV ''reinit statics
417417
exit sub
@@ -539,7 +539,7 @@ private sub check_optim(byref code as string)
539539
code="#O1 "+code
540540
else
541541
if prevpart2="" then ''todo remove me after fixed
542-
asm_error("prevpart empty ????????")
542+
asm_error("prev/part empty "+"part1="+part1+" part2="+part2+" prevpart1="+prevpart1+" prevpart2="+prevpart2)
543543
asm_info("code="+code)
544544
asm_info("part1="+part1+" part2="+part2+" prevpart1="+prevpart1+" prevpart2="+prevpart2)
545545
exit sub
@@ -6189,7 +6189,11 @@ private sub _emitasmline( byval asmtokenhead as ASTASMTOK ptr )
61896189

61906190
select case( n->type )
61916191
case AST_ASMTOK_TEXT
6192-
asmline += *n->text
6192+
if *n->text="," then ''add a space to avoid issue during optimization
6193+
asmline += ", "
6194+
else
6195+
asmline += *n->text
6196+
end if
61936197
asm_info("asm text="+*n->text)
61946198
case AST_ASMTOK_SYMB
61956199

0 commit comments

Comments
 (0)