I'm using same code, date "april 20", freebasic 1.07.1 (x64) and lastest GAS64
This line is different between your output log and mine:
assembling: c:\aplis\FreeBasic\bin\win64\as.exe --64 "_80486_emu.a64" -o "_80486_emu.o"In my case, GAS compiler is using "AS.EXE", is automatic? or optional?
or maybe parameter are different?
Compiling with GCC is correct (in rar file downloaded, ther is one BAT to compile with GCC fine)
Look output asm:
Code: Select all
mov r11, QWORD PTR TOP$[rip+0]
and r11, 7
shl r11, 3
lea r8, STD$[rip+0] #NO_OPTIM
cvtsd2ss xmm0, [r8+r11]
#O3movd r10d, xmm0
#O3mov -116[rbp], r10d
#O3movss -116[rbp], xmm0 #Optim 3
FOUND AN ERROR : in check_optim mov unkonwn=mov (THIS LINE IS 57481 IN MY OUTPUT LOG)
#O3mov ecx, -116[rbp]
mov ecx, #Optim 3
call SETEAL$ #NO_ALL
mov rax, -7
add QWORD PTR CYCLES$[rip+0], rax
jmp .Lt_2C41
jmp .Lt_2C71
.Lt_2C78:
mov r11, QWORD PTR TOP$[rip+0]
and r11, 7
shl r11, 3
lea r8, STD$[rip+0] #NO_OPTIM
cvtsd2ss xmm0, [r8+r11]
#O3movd r10d, xmm0
#O3mov -116[rbp], r10d
#O3movss -116[rbp], xmm0 #Optim 3
FOUND AN ERROR : in check_optim mov unkonwn=mov (THIS LINE IS 57497 IN MY OUTPUT LOG)
#O3mov ecx, -116[rbp]
mov ecx, #Optim 3
call SETEAL$ #NO_ALL
cmp QWORD PTR ABRT$[rip+0], 0
je .Lt_2C7A
jmp .Lt_2C41
.Lt_2C7A:
Maybe, i go to try compile your gas source, for locate error by myself...
[edit]: i got compiled gas64 from your sources, and discover that (maybe) is missing another case in file "ir-gas64.bas", line 553, some like this:
Code: Select all
''xmm register ?
elseif prevpart2[0]=asc("x") then
asm_info("OPTIMIZATION 3")
mid(ctx.proc_txt,prevwpos)="#O3"
if prevmov="movq" then
if instr(part2,"[") then
mov="movsd"
else
mov="movq"
end if
elseif prevmov="movd" then
if part1[0]=asc("r") or part1[0]=asc("e") then
mov="movd"
else
mov="movss"
end If
elseif prevmov="movss" Then
mov="movd"
Else
asm_error("in check_optim mov unkonwn="+mov)
end if
In order to test it, did make this missing case and all works.