Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Overflow not detected
Locked
Locked
Replies
3 replies
Subscribers
119 subscribers
Views
2642 views
Users
0 members are here
Options
Share
More actions
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Overflow not detected
Stefano Cillo
over 12 years ago
Note: This was originally posted on 6th September 2010 at
http://forums.arm.com
Hi all,
I'm quite new in arm assembly programming, and I went into a odd behaviour.
I'm going to multiply two numbers with the mul instruction;
the code is:
ldr r0, =0x26000000
ldr r1, =0x10
muls r2, r1, r0
bvs somewhere
The result from the the mul istruction is (0x2600 0000 * 0x10 = ) 0x2 6000 0000.
Now, i expected the V bit going to one, but none of the CPSR bits is setted.
Why is happening this? How can I detect overflow in such operations?
I'm using the gnuarm compiler, and working with 32-bit registers.
Thanks in advance,
Stefano.
0
Quote