Question: 3. Copy a short integer array of certain length . Use the sample code on slide 39 of LectureWeek7and8.pdf as a template. void copy 1

3. Copy a short integer array of certain length. Use the sample code on slide 39 of LectureWeek7and8.pdf as a template.

void copy1(short X[], short Y[], int N)

{

int i;

for (i = 0; i < N; i++) {

Y[i] = X[i];

}

}

4. Copy a 64-bit integer array of certain length. You should use LDMxx and STMxx instructions.

void copy2(int64_t *Y, int64_t *X, intN)

{

for (int i = 0; i < N; i++) {

*Y++ = *X++;

}

}

Note: The about C function is equivalent to the following C code:

void copy2(int64_t Y[], int64_t X[], intN)

{

for (int i = 0; i < N; i++) {

Y[i] = X[i];

}

}

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!