Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Is 'mov r1,#0xab0000' right?
Jump...
Cancel
Locked
Locked
Replies
5 replies
Subscribers
119 subscribers
Views
2993 views
Users
0 members are here
Options
Share
More actions
Cancel
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
Is 'mov r1,#0xab0000' right?
Gaofeng He
over 12 years ago
Note: This was originally posted on 23rd June 2011 at
http://forums.arm.com
I am a beginner in ARM assembly. Recently I meet a question about that is the instruction 4'mov r1,#0xab0000' right?
As we know the MOV Instruction has an Operand2 field which contains 8bits imm8m field and a bits rotate field. But many books say that the constant can
only be 0~255
means only use the imm8m filed without using the rotate field. I then download a arm instruction quick reference card PDF. It says Operand2 can represent a 32bits constant which can get by 8bits immdiate filed and the rotate. So I think Mov r1,#0xab0000 is valid. Actually I can successfully compiled the instruction in Keil uvision.
Is it true that for all ARM compilers, the instruction above will be passed with a constant value which exceed 255 but can get by 8bits immdiate and an rotate? In another word, can these instructions directly be supported by general ARM assembly compilers? For example mov r1,#0xab00.
Thanks
Parents
Gaofeng He
over 12 years ago
Note: This was originally posted on 23rd June 2011 at
http://forums.arm.com
Thank you
Cancel
Vote up
0
Vote down
Cancel
Reply
Gaofeng He
over 12 years ago
Note: This was originally posted on 23rd June 2011 at
http://forums.arm.com
Thank you
Cancel
Vote up
0
Vote down
Cancel
Children
No data