English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Asm / Hardware (http://eab.abime.net/forumdisplay.php?f=112)
-   -   VASM fatal error.. (http://eab.abime.net/showthread.php?t=75892)

jimmy2x2x 20 November 2014 22:06

VASM fatal error..
 
Ive been getting along quite well with Vasm for a couple of days now,
just setup my first linking file and all is working as expected.

Then I suddenly get this when adding a little more code.

Code:

Assembling, Compiling, and Linking dh0\mydemo.exe

fatal error 8: cannot resolve section <mycode>, maximum number of passes reached

aborting...
vasmm68k_mot  -x -maxerrors=50 -m68000 -opt-brajmp -Fhunk -align -phxass "source
\main.s" -o "source\main.o" -I"%VBCC%/targets/m68k-amigaos/ndk/include_i" -I"Sou
rce" -quiet  failed: No error
Press any key to continue . . .


I remove a few lines of code and it assembles and links again, do I need to increase a buffer size or something like that. Looks like something might be overflowing.

Code:

        move.l        d1,d0
        add.l        #(80*256),d0
        move        d0,CopperScreen3+6
        swap        d0
        move        d0,CopperScreen3+2
        ; move.l        d1,d0
        ; add.l        #(120*256),d0
        ; move        d0,CopperScreen4+6
        ; swap        d0
        ; move        d0,CopperScreen4+2

The above code is what im working on, if I leave it as you see it, everything works as expected. If I uncomment those last 5 lines the above assembly error triggers.

Thanks

phx 21 November 2014 11:23

Quote:

Originally Posted by jimmy2x2x (Post 987808)
Code:

Assembling, Compiling, and Linking dh0\mydemo.exe

fatal error 8: cannot resolve section <mycode>, maximum number of passes reached


Make sure you are running the latest vasm version (1.7a). There have been bug fixes for infinitely oscillating optimisations.


Quote:

I remove a few lines of code and it assembles and links again, do I need to increase a buffer size or something like that. Looks like something might be overflowing.
It is probably a combination of branch optimisations and alignment restrictions which force vasm's optimiser to oscillate one or more branches between byte- and word-size. So the maximum number of passes (1000) are finally reached.

I didn't see this problem in recent vasm versions, but in the past it was triggered by agressive branch optimisations. Using the -phxass option, which includes -opt-allbra, and -opt-brajmp, certainly increases the likelyhood of such a situation. Can you assemble without -phxass and -opt-brajmp? The last option should never be needed in sane sources anyway. ;)


Quote:

The above code is what im working on, if I leave it as you see it, everything works as expected. If I uncomment those last 5 lines the above assembly error triggers.
Removing this code makes the branch-distance for the problematic branch smaller. So it stays a byte-branch in all passes and the problem disappears.

When there are still problems, even with the latest release, then try to analyse the problem with the -debug option and send me the output, or better the original source, by mail.

jimmy2x2x 21 November 2014 11:27

Will do, thank you for your support.

I am moving house over the weekend and will likely be without internet for a short while.

As soon as I am settled, I will follow your advice and suggestions.

Thanks again, I really love using vasm!


All times are GMT +2. The time now is 21:24.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.

Page generated in 0.03869 seconds with 11 queries