subject

5. Write assembly functions that implement the following C functions: a. uint64_t addU32_U64(uint32_t x, uint32_t y) // returns x+y
b. int64_t addS64(int64_t x, int64_t y) // returns x+y
c. int32_t convertS8ToS32(int8_t x) // converts 8-bit signed value to 32-bits
signed
d. int32_t convertU16ToS32(uint16_t x) // converts 16-bit unsigned value to
32-bits signed
e. int16_t maxS16(int16_t x, int16_t y) // returns the maximum of x, y
f. uint32_t maxU32(uint32_t x, uint32_t y) // returns the maximum of x, y
g. bool isGreaterThanU16(uint16_t x, uint16_t y) // returns 1 if x>y, 0 else
h. bool isGreaterThanS16(int16_t x, int16_t y) // returns 1 if x>y, 0 else
i. int32_t shiftRightS32 (int32_t x, uint8_t p) // returns x >> p = x*2^(-p) for
p = 0..31
j. uint16_t shiftU16(uint16_t x, int8_t p) // return x*2^p for p = -31..31
k. bool isEqualU16(uint16_t x, uint16_t y) // returns 1 if x=y, 0 if x!=y
l. bool isStrEqual(const char* str1, const char* str2) // returns 1 if the strings
are equivalent, 0 otherwise
m. void strCat(char* strTo, const char* strFrom) // concatenates strFrom to
the end of strTo (make sure that strTo contains enough room for strFrom
and strTo to prevent a seg fault)

Functions need to be written in ARM assembly language.

Raspberry Pi Assembly Language

All of the functions above should be present in a single file named hw2_prob5.s with functions callable from a C program. You do not need to submit the C files.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:00
Jill wants to become a network professional. which certification would be useful for her? a. mcse b. pmp c. comptia a+ d. ccie
Answers: 2
question
Computers and Technology, 22.06.2019 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
You know the right answer?
5. Write assembly functions that implement the following C functions: a. uint64_t addU32_U64(uint32...
Questions
question
Biology, 25.03.2021 19:50
question
Medicine, 25.03.2021 19:50
question
Mathematics, 25.03.2021 19:50
question
Mathematics, 25.03.2021 19:50