NO

Author Topic: error #3055: [asmCan't generate code for this constant: 5816  (Read 3768 times)

drakoh

  • Guest
error #3055: [asmCan't generate code for this constant: 5816
« on: April 07, 2005, 07:32:34 PM »
hi there !

here is my today addition ! ^_^

trying to compile zlib within a project, and on the deflate.c I have the error :
error #3055: [asm] Can't generate code for this constant: 5816

I am trying to compile for pocketpc, with the latest pellesc 3.00.4

here follows the whole project

thx for your time guys !

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
error #3055: [asmCan't generate code for this constant: 5816
« Reply #1 on: April 08, 2005, 02:00:06 PM »
Hello,

The problem is in the deflateCopy function in deflate.c (~line 623):
Code: [Select]

*ds = *ss;

This assigns a structure to another structure, using an internal copy loop (generated by the compiler). I will fix this, but as a work-around, change the code to something like this:

Code: [Select]

memcpy(ds, ss, sizeof(*ds));


(The basic problem is that ARM is a RISC processor, where all instructions are 32 bits, and some bits are used to encode the instruction itself. This means that some constants won't fit, and needs special treatment. The internal copy loop is not frequently used, so I have missed the case with "impossible" values here...)

Pelle
/Pelle

drakoh

  • Guest
error #3055: [asmCan't generate code for this constant: 5816
« Reply #2 on: April 08, 2005, 02:37:09 PM »
hehe so fast, ya shall be called 'lightning pelle' !

I will try this trick as soon as possible !

PS: thx it did the trick !