contiki-ng / mspsim

Official MSPSim git repository
BSD 3-Clause "New" or "Revised" License
66 stars 83 forks source link

Instruction Decoding - Possible Issue #33

Open caioso opened 10 years ago

caioso commented 10 years ago

Hello guys! Today I was running a bunch of code with mspsim and I faced an unexpected behavior of the simulator. If you look carefully at the image, it can be seen that Register 7 (R7) is submitted to a byte swap operation (PC=0xFC66h), and there is nothing abnormal at this point. By analyzing two lines below (PC=0xFC6E) it can be seen that the same register is rolled right. If I'm not wrong, the expected value to be stored at Register 7 was 0x5200 but for some reason mspsim stored a null value at it. However, by analyzing the instruction bytes at the left, it can be seen that they actually refer to SXT R7 and not RRA.W R7. Considering that the instruction executed was SXT, the result is reasonable. I think it won't change at the end but I'd like to report this tiny possible issue. I'm using mspsim 0.97 at Ubuntu 13.10.

screen shot 2014-04-03 at 14 08 13