Rev. 1.50, 10/04, page 339 of 448
10.1.80 XOR (Exclusive OR Logical): Logical Instruction
Format
Operation
Instruction Code
Cycle
T Bit
XOR Rm,Rn
Rn ^ Rm
→
Rn
0010nnnnmmmm1010
1 —
XOR #imm,R0
R0 ^ imm
→
R0
11001010iiiiiiii
1 —
XOR.B #imm,@(R0,GBR)
(R0 + GBR)^imm
→
(R0 + GBR)
11001110iiiiiiii
3 —
Description:
This instruction exclusively ORs the contents of general registers Rn and Rm, and
stores the result in Rn.
This instruction can be used to exclusively OR register R0 contents with zero-extended 8-bit
immediate data, or, in indexed GBR indirect addressing mode, to exclusively OR 8-bit memory
with 8-bit immediate data.
Notes:
None
Operation:
XOR(long m, long n) /* XOR Rm,Rn */
{
R[n] ^= R[m];
PC += 2;
}
XORI(long i) /* XOR #imm,R0 */
{
R[0] ^= (0x000000FF & (long)i);
PC += 2;
}
XORM(long i) /* XOR.B #imm,@(R0,GBR) */
{
int temp;
temp = (long)Read_Byte(GBR+R[0]);
temp ^= (0x000000FF &(long)i);
Write_Byte(GBR+R[0],temp);
PC += 2;
}
Содержание SuperH SH-4A
Страница 2: ...Rev 1 50 10 04 page ii of xx ...
Страница 8: ...Rev 1 50 10 04 page viii of xx ...
Страница 116: ...Rev 1 50 10 04 page 96 of 448 ...
Страница 178: ...Rev 1 50 10 04 page 158 of 448 ...
Страница 206: ...Rev 1 50 10 04 page 186 of 448 ...
Страница 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Страница 445: ...Rev 1 50 10 04 page 425 of 448 Possible Exceptions Invalid operation Overflow Underflow Inexact ...
Страница 446: ...Rev 1 50 10 04 page 426 of 448 ...
Страница 468: ...Rev 1 50 10 04 page 448 of 448 ...
Страница 471: ......
Страница 472: ...SH 4A Software Manual ...