[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Edje not working

On Monday 03 July 2006 05:39, Frank Dischner wrote:
> OK, I've found the problem. It seems that casting
> unaligned ints doesn't work on the GP2X. I modified
> EXTRACT_INT accordingly and now it's working. It's a
> bit slow, but I assume that's due to the lack of a
> fpu.

Sorry to be late on this subject, I started EXTRACT_INT with a macro looking 
like that :

#define EXTRACT_INT(Value, Pointer, Index) \
        { \
                uint32_t tmp = 0; \
                memcpy (&tmp, Pointer + Index, sizeof (uint32_t)); \
                Value = ntohl (tmp); \
                Index += sizeof(uint32_t); \

But it's seemed to complex for me to handle this case, so I choose the 
simplified version that worked well on x86 and x86-64 arch. Now with ARM, 
and probably other RISC arch, it will certainly trigger the same problem. 
Did you have a smarter patch for this problem ?