> I'm having some problems loading a double from memory during execution of > my PowerPC ISA on O3CPU. I've tracked the problem down to the endianness > conversion when the data is extracted from the packet during the call: Mem > = pkt->get<double>(); Basically, the packet contains the data 0xf8ff or > 0xfff8000000000000 once endian conversion has taken place. This, > unfortunately, represents NaN and so I'm getting a value of 0 out from > this call. > > One fix that I can make in the ISA decoder is to simply load floating > point values as integers, rather than doubles or floats. E.g. Fb.uq = > Mem.uq instead of Fb = Mem.df . Is this the best way to fix this problem > or am I missing something easier (or more obvious)?
I think that this is the correct way to do this. It should be stored using an integer as well. In general, I think that the memory system should just store blobs of memory without any structure and that it's up to the CPU to provide structure. (I also think that the memory system shouldn't be involved in endianness and it's been on my todo list to fix that forever.) Nate _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
