¡@

Home 

c++ Programming Glossary: ldr

What is the fastest integer division supporting division by zero no matter what the result is?

http://stackoverflow.com/questions/16777456/what-is-the-fastest-integer-division-supporting-division-by-zero-no-matter-what

version with GCC f subs r3 r1 #0 str lr sp # 4 moveq r0 r3 ldreq pc sp #4 bl __divsi3 ldr pc sp #4 My code with the ARM compiler.. r1 #0 str lr sp # 4 moveq r0 r3 ldreq pc sp #4 bl __divsi3 ldr pc sp #4 My code with the ARM compiler f PROC RSBS r2 r1 #1.. GCC f str lr sp # 4 cmp r1 #0 addeq r1 r1 #1 bl __divsi3 ldr pc sp #4 All versions still need a branch to the division routine..

Fastest way in C to determine if an integer is between two integers (inclusive) with known sets of values

http://stackoverflow.com/questions/17095324/fastest-way-in-c-to-determine-if-an-integer-is-between-two-integers-inclusive

p range p range.start range.diff Ltmp1313 ldr r0 sp #176 @ 4 byte Reload ldr r1 sp #164 @ 4 byte Reload ldr.. range.diff Ltmp1313 ldr r0 sp #176 @ 4 byte Reload ldr r1 sp #164 @ 4 byte Reload ldr r0 r0 ldr r1 r1 sub.w r0 r9 r0.. r0 sp #176 @ 4 byte Reload ldr r1 sp #164 @ 4 byte Reload ldr r0 r0 ldr r1 r1 sub.w r0 r9 r0 cmp r0 r1 blo LBB44_30 OLD WAY..