FAQ  •  Register  •  Login

fourspriter error with -O 2 option

<<

jevilon

Posts: 4

Joined: Wed Feb 06, 2013 8:44 pm

Post Thu Feb 07, 2013 8:25 pm

fourspriter error with -O 2 option

When I try to build my game, using fourspriter 2.1, if you compile normal works, but if I put optimization level 2 or level 3 gives me the error:

main.bas: 5526: error: Undefined label '__LABEL__fsp21DataPool'

Na_th_an I asked and he said that you mentioned it to you.

greetings
<<

wilco2009

Posts: 28

Joined: Sat Nov 24, 2012 1:23 am

Post Mon Feb 11, 2013 8:06 pm

Re: fourspriter error with -O 2 option

It is logical.

Fourspriter has some routines just to contain assembler code or data. These routines never have been called from basic but yes from assembler code.

Compiler optimization process removes mentioned routines, but then them can't be called from assembler.

Perhaps Boriel can detect these kind of situation in compiling time to solve it
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Mon Feb 11, 2013 8:14 pm

Re: fourspriter error with -O 2 option

wilco2009 wrote:It is logical.

Fourspriter has some routines just to contain assembler code or data. These routines never have been called from basic but yes from assembler code.

Compiler optimization process removes mentioned routines, but then them can't be called from assembler.

Perhaps Boriel can detect these kind of situation in compiling time to solve it

These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code.
<<

wilco2009

Posts: 28

Joined: Sat Nov 24, 2012 1:23 am

Post Mon Feb 11, 2013 8:36 pm

Re: fourspriter error with -O 2 option

boriel wrote:
wilco2009 wrote:It is logical.

Fourspriter has some routines just to contain assembler code or data. These routines never have been called from basic but yes from assembler code.

Compiler optimization process removes mentioned routines, but then them can't be called from assembler.

Perhaps Boriel can detect these kind of situation in compiling time to solve it

These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code.

Yes, it will be perfect!.
It could be the best solution.
<<

wilco2009

Posts: 28

Joined: Sat Nov 24, 2012 1:23 am

Post Sat Feb 16, 2013 10:14 am

Re: fourspriter error with -O 2 option

boriel wrote:
wilco2009 wrote:It is logical.

Fourspriter has some routines just to contain assembler code or data. These routines never have been called from basic but yes from assembler code.

Compiler optimization process removes mentioned routines, but then them can't be called from assembler.

Perhaps Boriel can detect these kind of situation in compiling time to solve it

These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code.

I'm searching in the wiki the pagma directive to avoid remove a certain part of code, but I can't find the documentation for pragma directive.
Could you help me on that?.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sat Feb 16, 2013 12:12 pm

Re: fourspriter error with -O 2 option

wilco2009 wrote:
boriel wrote:
wilco2009 wrote:It is logical.

Fourspriter has some routines just to contain assembler code or data. These routines never have been called from basic but yes from assembler code.

Compiler optimization process removes mentioned routines, but then them can't be called from assembler.

Perhaps Boriel can detect these kind of situation in compiling time to solve it

These is very hard to fix (almost impossible). The 1st workaround is to place a dummy call somewhere. But the usual one is to use a #pragma directive to tell the compiler not to remove such code.

I'm searching in the wiki the pagma directive to avoid remove a certain part of code, but I can't find the documentation for pragma directive.
Could you help me on that?.

It's not implemented yet! It was just an idea :oops:
:mrgreen:
<<

wilco2009

Posts: 28

Joined: Sat Nov 24, 2012 1:23 am

Post Sat Feb 16, 2013 7:30 pm

Re: fourspriter error with -O 2 option

Oh sorry. I'll wait then. :lol:

Return to Bug Reports

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO