Re: [Qemu-devel] [PATCH 1/3] cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write

2011-04-10 Thread Stefan Weil
Am 10.04.2011 00:37, schrieb Aurelien Jarno: On Sat, Mar 26, 2011 at 09:06:55PM +0100, Stefan Weil wrote: A lot of calls don't operate on bytes but on words or on structured data. So instead of a pointer to uint8_t, a void pointer is the better choice. This allows removing many type casts.

Re: [Qemu-devel] [PATCH 1/3] cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write

2011-04-10 Thread Artyom Tarasenko
On Sat, Mar 26, 2011 at 9:06 PM, Stefan Weil w...@mail.berlios.de wrote: A lot of calls don't operate on bytes but on words or on structured data. So instead of a pointer to uint8_t, a void pointer is the better choice. Wouldn't it make the endianness conversions more complex? uint8_t[] has a

Re: [Qemu-devel] [PATCH 1/3] cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write

2011-04-10 Thread Aurelien Jarno
On Sun, Apr 10, 2011 at 08:16:05AM +0200, Stefan Weil wrote: Am 10.04.2011 00:37, schrieb Aurelien Jarno: On Sat, Mar 26, 2011 at 09:06:55PM +0100, Stefan Weil wrote: A lot of calls don't operate on bytes but on words or on structured data. So instead of a pointer to uint8_t, a void pointer is

Re: [Qemu-devel] [PATCH 1/3] cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write

2011-04-09 Thread Aurelien Jarno
On Sat, Mar 26, 2011 at 09:06:55PM +0100, Stefan Weil wrote: A lot of calls don't operate on bytes but on words or on structured data. So instead of a pointer to uint8_t, a void pointer is the better choice. This allows removing many type casts. (Some very early implementations of memcpy

[Qemu-devel] [PATCH 1/3] cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write

2011-03-26 Thread Stefan Weil
A lot of calls don't operate on bytes but on words or on structured data. So instead of a pointer to uint8_t, a void pointer is the better choice. This allows removing many type casts. (Some very early implementations of memcpy used char pointers which were replaced by void pointers for the same