>>>> If alignment is not guaranteed, casting from uint32 to void would cause >>>> problems too, wouldn't it? >>> Why? >> >> Sorry for confusion. I meant the casting within "mips32_pracc_read_mem". This >> is also a cast from void* to uint32_t*. If there will be an alignment error, >> it will >> occur here too. > > That's correct. There is no way to know from the code context, is there? > > No documentation either.
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 BR, Stefan _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development