Menu

#38 6.1.0 DOS compile won't run on < 686

open-accepted
None
5
2010-03-20
2009-12-30
No

Both DOSBox 0.73 (486) and my P166 (586) seem to not run 6.1.0 / DJGPP version due to (I'm blindly guessing) a bad compile accidentally using "-march=i686".

C:\TEMP>biew
Exiting due to signal SIGILL
Invalid Opcode at eip=0008681c
eax=0009ac50 ebx=000b31fc ecx=00000000 edx=00086100 esi=0013a108 edi=00000020
ebp=000b31fc esp=00138cf0 program=C:\UTILS\BIEW.EXE
cs: sel=00af base=00110000 limit=0013ffff
ds: sel=00b7 base=00110000 limit=0013ffff
es: sel=00b7 base=00110000 limit=0013ffff
fs: sel=008f base=00004c00 limit=0000ffff
gs: sel=00c7 base=00000000 limit=0010ffff
ss: sel=00b7 base=00110000 limit=0013ffff
App stack: [00138ef8..000b8ef8] Exceptn stack: [000b8e4c..000b6f0c]

Call frame traceback EIPs:
0x0008681c

Discussion

  • dos386

    dos386 - 2010-01-07

    > Both DOGBox 0.73 (486) and my P166 (586) seem to not run 6.1.0 / DJGPP
    > version due to (I'm blindly guessing) a bad compile
    > accidentally using "-march=i686".

    Why don't you disassemble the offending code as I did with MPLAYER ?

    > C:\TEMP>biew
    > Exiting due to signal SIGILL
    > Invalid Opcode at eip=0008681c

    Most likely CMOVNTQ (again, after FreeBASIC G[R]DB and MPLAYER), stupid DGJPP catches exceptions (any way to disable ???) but doesn't reveal the offending code.

    > Call frame traceback EIPs: 0x0008681c

    same as above ...

    I didn't test on my P1 yet (since 5.7.0 it doesn't work on P4 either, because of the now hopefully fixed-in-SVN YASM-spawn-BUG) ... but the next DOS version should be compiled with "-march=i386" of course ;-)

     
  • Anthony Williams

    biew.exe, biew610.bat

     
  • Anthony Williams

    @echo off
    REM http://sourceforge.net/projects/beye
    REM Recompile BIEW / BEYE for 386+ machines (default build is 686+, oops)

    set BIEWVER=610
    set BIEWFILE=z:\hexedit\biew-%BIEWVER%-src.tar.bz2
    if "%CFLAGS%"=="" set CFLAGS=-Os
    if "%OS%"=="Windows_NT" set BEGAN=%TIME%

    if exist %BIEWFILE% djtar -x %BIEWFILE%
    if exist biew-%BIEWVER%\configure goto begin
    if not exist biew-%BIEWVER%-src.t* if exist %BIEWFILE% copy /b %BIEWFILE% .
    bzip2 -d biew-%BIEWVER%-src.tar.bz2
    tar -xvf biew-%BIEWVER%-src.tar
    if not exist biew-%BIEWVER%\configure goto end

    :begin
    cd biew-%BIEWVER%
    sh -c "./configure --target-system=dos"
    sed -i "s/-mmmx//;s/-msse//;s/-O2/%CFLAGS%/" config.mak
    make
    if exist biew.exe goto show
    REM newer BinUtils (e.g. 2.19, unlike 2.16.1) abort w/o this workaround :-/
    make biewlib/sysdep/ia32/cpu_info.o -n | sed "s/gcc/& -march=pentium4/" >blah
    sh -c "./blah ; del blah"
    if not exist biew.exe make

    :show
    echo.
    if "%OS%"=="Windows_NT" echo Began compiling at %BEGAN% and ended at %TIME%.
    echo.
    dir biew.exe
    upx --best --lzma biew.exe

    :end
    for %%a in (BEGAN BIEWVER BIEWFILE CFLAGS) do set %%a=

     
  • Anonymous

    Anonymous - 2010-03-20

    After renaming of the project into beye, i've redesigned internal architecture of the project and such bugs probably shall never be happens. Binaries packages will require i686 and x86_64 cpus but sources will be free from such dependencies on i686 instruction set

     
  • Anonymous

    Anonymous - 2010-03-20
    • assigned_to: nobody --> nickols_k
    • status: open --> open-accepted
     

Log in to post a comment.