Newbie ARM assembler question. I am writing my first arm assembler program and I am trying to code this C fragment.
int x = somevalue1 << 12; // s19.12
int y = somevalue2 << 12; // s19.12
int a = somevalue3 << 12; // s19.12
int b = somevalue4 << 12; // s19.12
int c = somevalue4 << 12; // s19.12
long long acc = (long long) a * b;
acc += (long long) x * y;
int res = (acc >> 24);
acc += (long long) c * a;
I have coded the first part and computed the sum in r10, r11 registers.
@ r6 =a, r4 = b, r0 = x,r2 =y, r3=c
smull r10, r11, r6, r4 @acc = a * b
smlal r10, r11, r0, r2 @acc += x * y
Now I need to extract the value of "res" back from the r10 and r11 registers by right shifting the "long long" by 24 bits. How do I do that ?
-thanks,