5.112 · exercise

Basic quiz: branching

Compares, the flags they leave, and the instructions that read them: b.cond with signed and unsigned conditions, cbz, and csel.

0 of 7 correct

Multiple choice

cmp w19, w20 works out w19 - w20. What happens to that difference?

Multiple choice

After cmp w1, w2, which branch is taken when w1 is greater than w2, with both read as signed numbers?

Multiple choice

The C reads if (temp < 0) { body }. After cmp temp_r, 0, which branch jumps past the body when the test is false?

Multiple choice

An if-else in assembly places the else block first. Why does that block end with an unconditional b?

Multiple choice

What does cbz w19, done do?

Multiple choice

After cmp w1, w2, what does csel w0, w1, w2, gt leave in w0?

Multiple choice

w1 holds -1 and w2 holds 1. After cmp w1, w2, which of b.lt and b.hi would branch?