Question: Write ARM assembly implementations for all of the functions below. The functions must be present in a single .s file. 1. uint64_t add64 (uint32_t x,

Write ARM assembly implementations for all of the functions below. The functions must be present in a single .s file.

1. uint64_t add64 (uint32_t x, uint32_t y) // returns x + y; worth 10 points

2. uint64_t sub64 (uint64_t x, uint64_t y) // returns x - y

3. uint8_t minU8 (uint8_t x, uint8_t y) // returns the minimum of x, y

4. int16_t minS16 (int16_t x, int16_t y) // returns the minimum of x, y

5. bool isLessThanU8 (uint8_t x, uint8_t y) // returns 1 if x < y, 0 else

6. bool isLessThanS16 (int16_t x, int16_t y) // returns 1 if x < y, 0 else

7. uint16_t shiftLeftU16 (uint16_t x, uint16_t p) // returns x << p = x * 2p for p = 0 .. 31

8. uint32_t shiftU32 (uint32_t x, int32_t p) // return x * 2p for p = -31 .. 31

9. int8_t shiftS8 (int8_t x, int8_t p) // return x * 2p for p = -31 .. 31

10. bool isEqualU8 (uint8_t x, uint8_t y) // returns 1 if x = y, 0 if x != y

11. bool isEqualS16 (int16_t x, int16_t y) // returns 1 if x= y, 0 if x != y

All available conditionals are on page 1-19 (39) of the ARM 7 Reference Manual. Keep in mind that signed and unsigned integers may require different conditionals.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!