You are not logged in.
Lost Password?

Register To Post

 Bottom   Previous Topic   Next Topic

XB and XH - Undefined behavior?
Posted on: 2018/4/22 17:36

Joined 2012/12/4
-1 Posts
CoderLong Time User (7 Years)
Nintendo added a handful of instructions to the stock V810 CPU when they made the NVC for Virtual Boy. Among them are XB (Exchange Byte) and XH (Exchange Halfword), which swap the lowest two bytes or both halfwords of a register, respectively.

These instructions are stored in instruction format II, which specifies two registers, but they only operate on one register, reg2. According to the development manual, if any register for reg1 other than r0 is used, the operation is undefined.

But for the life of me, I haven't been able to get any unusual results out of these instructions no matter which registers or input values I use. Does anyone have any information regarding cases where these instructions will misbehave?

For the time being, it looks like the register specified in the reg1 field is irrelevant.

 Top   Previous Topic   Next Topic

Register To Post