5.91 · exercise

Predict: arrays and structures

Block sizes and byte offsets: how a C array declaration turns into the bytes to reserve and the offset a load uses.

0 of 4 correct

Predict the result

// C: int ia[5];

        .bss
        .balign 4
ia:     .skip N

Predict the result

// C: char array[2][3];
// x20 holds the address of array[0][0]

ldrb w21, [x20, OFFSET]

Predict the result

// C: long myArray[5] = {10, 20, 30, 40, 50};
// x20 holds the address of myArray[0]

ldr x21, [x20, OFFSET]

Predict the result

// C: int ia[2][3][3];