Am 07/07/2011 10:41 PM, schrieb Mahr, Stefan:
> Probably the best way would be to remove endianness swapping from 
> mips_m4k_read_memory
> and put it to mips32_pracc/dma_read_mem32/16. Same for write.
>
> pro: mips32_pracc_read_mem32, ... will return a byte array in target 
> endianness, so no cast necessary.
> con: Add swapping to at least 10 seperate functions
Not sure about this.

Without having a look at the code, I would expect a function with
read_mem32 in the name to return a 32-bit value, not a byte array, and I
would expect to get a 32-bit value without a cast.

Especially if this is used in 10 places, this looks like there *is* a
need for a function that returns swapped 32-bit values, only the
function uses the wrong data types.

cu
Michael



_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to