l_mpy_ls.s 601 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .text
  2. .align 4
  3. .code 32
  4. .global L_mpy_ls
  5. .type L_mpy_ls, %function
  6. @*
  7. @* Longword L_mpy_ls(Longword L_var1, Shortword var2);
  8. @*
  9. @* register Word32 ra = L_var1_hi; r4
  10. @* register Word32 rb = L_var1_lo; r5
  11. @* register Word32 rc = var2; r1
  12. @* Word32 result; r6
  13. @* Word32 L_product; r7
  14. L_mpy_ls:
  15. STMFD sp!,{r4 - r11,lr}
  16. EOR r3,r3,r3
  17. MOVW r3,#0xFFFF
  18. AND r4,r3,r0, ASR #16
  19. AND r5,r0,r3
  20. LSR r5,r5,#1 @ truncated to 31 bits for EVRC
  21. SMULBB r7,r4,r1
  22. MOV r6,#0
  23. QDADD r7,r6,r7
  24. SMULBB r6,r5,r1
  25. MOV r4,r6, ASR #15
  26. QDADD r6,r7,r4
  27. MOV r0,r6
  28. LDMFD sp!,{r4 - r11,lr}
  29. BX lr