Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
IP Products
Processors
Jump...
Cancel
Processors
Classic processors forum
compile time constant expressions
Blogs
Forums
Videos & Files
Help
Jump...
Cancel
New
State
Accepted Answer
+1
person also asked this
people also asked this
Replies
4 replies
Subscribers
2 subscribers
Views
3242 views
Users
0 members are here
compiler
optimization
Arm9
arm926ej-s
MPI
Related
compile time constant expressions
Offline
Mike Rieker
over 7 years ago
Note: This was originally posted on 12th March 2009 at
http://forums.arm.com
I am seeing code like this generated from the armcc v4.0 compiler (just downloaded it a couple hours ago):
MOV r0,#5
CLZ r0,r0
RSB r7,r0,#0x3f
So I would think the compiler would know that R7 has 34 in it or whatever. It isn't so bad these three instructions, it's just that in this case the code goes on to divide by the r7 value and so generates a call to __aeabi_uldivmod whereas I was expecting the compiler to generate a UMULL or something like that.
Is there some command-line optimization option I can use to fix this? I am using this command line:
armcc --cpu=ARM926EJ-S --inline -Otime -O3 -S -o test.s test.c
Thanks!
Mike
Top replies
Offline
Simon Craske
over 7 years ago
+1
verified
Note: This was originally posted on 13th March 2009 at http://forums.arm.com There isn't a count leading zero construct in the C language, so presumably it's something like: [font="Courier New"]int func...
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Answered
ARM926EJ-S, Can a STMIA result in four single accesses instead of a burst?
+1
32-bit
Arm9
6037
views
5
replies
Latest
over 4 years ago
by
Chris Shore
Answered
in arm7tdmi, when FIQ and RIQ occures at same time so how both are executed sequentially,first FIQ and thenIRQ?
0
Arm7
Cortex-M3
Cortex-A
Cortex-A7
Cortex-M
12717
views
12
replies
Latest
over 4 years ago
by
Jens Bauer
Answered
State of link register on an interrupt from Thumb (ARM7TDMI).
+1
Arm7
Thumb
2392
views
1
reply
Latest
over 4 years ago
by
Yasuhiko Koumoto
Answered
Program Execution Cycles
+1
Raspberry Pi
Arm11
4108
views
3
replies
Latest
over 4 years ago
by
Chris Shore
Answered
PMU (Performance monitor Unit)
0
Raspberry Pi
Arm11
Performance Monitor Unit (PMU)
5873
views
3
replies
Latest
over 4 years ago
by
Yasuhiko Koumoto
<
>
View all questions in Classic processors forum