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

Re: [E-devel] Edje not working



On Mon, 3 Jul 2006 10:59:07 +0200 Cedric <cedric.bail@free.fr> babbled:

> 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 ?

you can't really avoid it without the memcpy. architectures like arm do not
handle unaligned memory accesses. the only thing u could do is copy by hand
byte-by-byte into the tmp var to avoid the memcopy fn call overhead

> Cedric
> 
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)