Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fourspriter error with -O 2 option
#1
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
Reply
#2
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
Reply
#3
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.
Reply
#4
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.
Reply
#5
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?.
Reply
#6
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:
Reply
#7
Oh sorry. I'll wait then. :lol:
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)