This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 03/14] sim/erc32: Switched emulated memory to host endian order.



On 02/03/15 02:13, Mike Frysinger wrote:
>> +#ifdef HOST_LITTLE_ENDIAN
>> > +		    for (i = 0; i < (count / 4); i++) wbuffer[i] = ntohl(wbuffer[i]); // endian swap
>> > +#endif
> sim-endian.h already provides a lot of helper funcs that i'm pretty sure you 
> can use here.
> 

I don't understand why ntohl() is a problem. It is a common Posix function
that converts big endian to host endian, exactly what is needed. Using
sim-endian.h pulls in a lot of the sim-*.c files due to dependencies and
makes the simulator larger than necessary ....

Jiri.

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]