Skip to content

Commit 975690e

Browse files
authored
Merge pull request #306 from SARG-FB/gas64_rev
gas64 backend - gas64 : fix an issue when only one character after a comma in an asmline - gas64 : removal of useless print
2 parents 0540479 + 0e9bfbf commit 975690e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/compiler/ir-gas64.bas

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ 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-
415414
if len(code)=0 then
416415
prevpart1="":prevpart2="":prevmov="":flag=KUSE_MOV ''reinit statics
417416
exit sub
@@ -539,7 +538,7 @@ private sub check_optim(byref code as string)
539538
code="#O1 "+code
540539
else
541540
if prevpart2="" then ''todo remove me after fixed
542-
asm_error("prevpart empty ????????")
541+
asm_error("prev/part empty "+"part1="+part1+" part2="+part2+" prevpart1="+prevpart1+" prevpart2="+prevpart2)
543542
asm_info("code="+code)
544543
asm_info("part1="+part1+" part2="+part2+" prevpart1="+prevpart1+" prevpart2="+prevpart2)
545544
exit sub
@@ -6189,7 +6188,11 @@ private sub _emitasmline( byval asmtokenhead as ASTASMTOK ptr )
61896188

61906189
select case( n->type )
61916190
case AST_ASMTOK_TEXT
6192-
asmline += *n->text
6191+
if *n->text="," then ''add a space to avoid issue during optimization
6192+
asmline += ", "
6193+
else
6194+
asmline += *n->text
6195+
end if
61936196
asm_info("asm text="+*n->text)
61946197
case AST_ASMTOK_SYMB
61956198

0 commit comments

Comments
 (0)