Page 249 - ARM 64 Bit Assembly Language
P. 249

Integer mathematics 237



                          1         add     x1, x0, x0, lsl #1
                          2         add     x0, x1, x0, lsl #2
                      7.5. Show the optimally efficient instruction(s) necessary to multiply a number in register
                           x0 by the constant 67 10 .
                      7.6. Show how to divide 78 10 by 6 10 using binary long division.
                      7.7. Demonstrate the division algorithm using a sequence of tables as shown in Sec-
                           tion 7.3.2 to divide 155 10 by 11 10 .
                      7.8. When dividing by a constant value, why is it desirable to have m as large as possible?
                      7.9. Modify your program from Exercise 5.13. in Chapter 5 to produce a 128-bit result,
                           rather than a 64-bit result.
                     7.10. Modify your program from Exercise 5.13. in Chapter 5 to produce a 128-bit result,
                           rather than a 64-bit result. How would you do this in C?
                     7.11. Write the bigint_shift_left_chunk function shown in Listing 7.8 in AArch64
                           assembly, and measure the performance improvement.
                     7.12. Write the bigint_mul_uint function in AArch64 assembly, and measure the perfor-
                           mance improvement.
                     7.13. Write the bigint_mul function in AArch64 assembly, and measure the performance
                           improvement.
   244   245   246   247   248   249   250   251   252   253   254