EasyManuals Logo

Renesas SuperH SH-4A User Manual

Renesas SuperH SH-4A
472 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #329 background imageLoading...
Page #329 background image
Rev. 1.50, 10/04, page 309 of 448
Operation:
SHAD(int m,n) /*SHAD Rm,Rn */
{
int sgn = R[m] & 0x80000000;
if (sgn==0)
R[n] <<= (R[m] & 0x1F);
else if ((R[m] & 0x1F) == 0) {
if ((R[n] & 0x80000000) == 0)
R[n] = 0;
else
R[n] = 0xFFFFFFFF;
}
else
R[n] = (long)R[n] >> ((~R[m] & 0x1F)+1);
PC += 2;
}
Example:
SHAD R1,R2 ;Before execution R1 = H'FFFFFFEC, R2 = H'80180000
;After execution R1 = H'FFFFFFEC, R2 = H'FFFFF801
SHAD R3,R4 ;Before execution R3 = H'00000014, R4 = H'FFFFF801
;After execution R3 = H'00000014, R4 = H'80100000

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas SuperH SH-4A and is the answer not in the manual?

Renesas SuperH SH-4A Specifications

General IconGeneral
BrandRenesas
ModelSuperH SH-4A
CategoryComputer Hardware
LanguageEnglish

Related product manuals