Hi,
When I run the below small example in BF533 processor, I am getting the value
incorrect.
Asm_code.asm:
r1.h = 0x3E5A;
r1.l = 0x2778;
A0 = R1;
R3.L = 0XFFDD; // -35 in decimal
R3 = R3.L(X);
A0 = ASHIFT A0 BY R3.L;
Can any tell me why the output of accumulator is not zero.
Regards
Sundar.S
Facing problem in ASHIFT instrauction in BF533
Started by ●August 30, 2006
Reply by ●August 30, 20062006-08-30
Sundar,
This is from the Programmers Ref Manual
The "ASHIFT" versions can shift 32-bit Dreg and 40-bit Accumulator
registers by up to -32 through +31 places.
This means only 6 LS bits are used from R3.L. 0xFFDD is interpreted as
0x001D, which is +29, and hence, the correct result that you see
(0xEF00000000) in A0.
Cheers,
George
_____
From: a... [mailto:a...] On Behalf Of Sundar
S.
Sent: Wednesday, August 30, 2006 4:15 AM
To: a...
Cc: Sundar S.
Subject: [adsp] Facing problem in ASHIFT instrauction in BF533
Hi,
When I run the below small example in BF533 processor, I am getting the
value incorrect.
Asm_code.asm:
r1.h = 0x3E5A;
r1.l = 0x2778;
A0 = R1;
R3.L = 0XFFDD; // -35 in decimal
R3 = R3.L(X);
A0 = ASHIFT A0 BY R3.L;
Can any tell me why the output of accumulator is not zero.
Regards
Sundar.SS
This is from the Programmers Ref Manual
The "ASHIFT" versions can shift 32-bit Dreg and 40-bit Accumulator
registers by up to -32 through +31 places.
This means only 6 LS bits are used from R3.L. 0xFFDD is interpreted as
0x001D, which is +29, and hence, the correct result that you see
(0xEF00000000) in A0.
Cheers,
George
_____
From: a... [mailto:a...] On Behalf Of Sundar
S.
Sent: Wednesday, August 30, 2006 4:15 AM
To: a...
Cc: Sundar S.
Subject: [adsp] Facing problem in ASHIFT instrauction in BF533
Hi,
When I run the below small example in BF533 processor, I am getting the
value incorrect.
Asm_code.asm:
r1.h = 0x3E5A;
r1.l = 0x2778;
A0 = R1;
R3.L = 0XFFDD; // -35 in decimal
R3 = R3.L(X);
A0 = ASHIFT A0 BY R3.L;
Can any tell me why the output of accumulator is not zero.
Regards
Sundar.SS
Reply by ●August 30, 20062006-08-30
even I got the same result when I compiled but I do not know the exact
reason...
----- Original Message -----
From: George Kadziolka
To: 'Sundar S.' ; a...
Sent: Wednesday, August 30, 2006 6:06 PM
Subject: RE: [adsp] Facing problem in ASHIFT instrauction in BF533
Sundar,
This is from the Programmers Ref Manual
The "ASHIFT" versions can shift 32-bit Dreg and 40-bit Accumulator
registers by up to -32 through +31 places.
This means only 6 LS bits are used from R3.L. 0xFFDD is interpreted as 0x001D, which is +29, and hence, the correct result that you see (0xEF00000000) in A0.
Cheers,
George
------
From: a... [mailto:a...] On Behalf Of Sundar S.
Sent: Wednesday, August 30, 2006 4:15 AM
To: a...
Cc: Sundar S.
Subject: [adsp] Facing problem in ASHIFT instrauction in BF533
Hi,
When I run the below small example in BF533 processor, I am getting the value incorrect.
Asm_code.asm:
r1.h = 0x3E5A;
r1.l = 0x2778;
A0 = R1;
R3.L = 0XFFDD; // -35 in decimal
R3 = R3.L(X);
A0 = ASHIFT A0 BY R3.L;
Can any tell me why the output of accumulator is not zero.
Regards
Sundar.SS
"SASKEN RATED Among THE Top 3 BEST COMPANIES TO WORK FOR IN INDIA - SURVEY 2005 conducted by the BUSINESS TODAY - Mercer - TNS India"
SASKEN BUSINESS DISCLAIMER
This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email
----- Original Message -----
From: George Kadziolka
To: 'Sundar S.' ; a...
Sent: Wednesday, August 30, 2006 6:06 PM
Subject: RE: [adsp] Facing problem in ASHIFT instrauction in BF533
Sundar,
This is from the Programmers Ref Manual
The "ASHIFT" versions can shift 32-bit Dreg and 40-bit Accumulator
registers by up to -32 through +31 places.
This means only 6 LS bits are used from R3.L. 0xFFDD is interpreted as 0x001D, which is +29, and hence, the correct result that you see (0xEF00000000) in A0.
Cheers,
George
------
From: a... [mailto:a...] On Behalf Of Sundar S.
Sent: Wednesday, August 30, 2006 4:15 AM
To: a...
Cc: Sundar S.
Subject: [adsp] Facing problem in ASHIFT instrauction in BF533
Hi,
When I run the below small example in BF533 processor, I am getting the value incorrect.
Asm_code.asm:
r1.h = 0x3E5A;
r1.l = 0x2778;
A0 = R1;
R3.L = 0XFFDD; // -35 in decimal
R3 = R3.L(X);
A0 = ASHIFT A0 BY R3.L;
Can any tell me why the output of accumulator is not zero.
Regards
Sundar.SS
"SASKEN RATED Among THE Top 3 BEST COMPANIES TO WORK FOR IN INDIA - SURVEY 2005 conducted by the BUSINESS TODAY - Mercer - TNS India"
SASKEN BUSINESS DISCLAIMER
This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email