target/riscv: add some switch fallthrough comments
This commit is contained in:
parent
352e6b82ed
commit
d570f89303
|
@ -603,6 +603,7 @@ static riscv_reg_t read_abstract_arg(struct target *target, unsigned index)
|
||||||
return ~0;
|
return ~0;
|
||||||
case 64:
|
case 64:
|
||||||
value |= ((uint64_t) dmi_read(target, DMI_DATA0 + offset + 1)) << 32;
|
value |= ((uint64_t) dmi_read(target, DMI_DATA0 + offset + 1)) << 32;
|
||||||
|
/* falls through */
|
||||||
case 32:
|
case 32:
|
||||||
value |= dmi_read(target, DMI_DATA0 + offset);
|
value |= dmi_read(target, DMI_DATA0 + offset);
|
||||||
}
|
}
|
||||||
|
@ -620,6 +621,7 @@ static int write_abstract_arg(struct target *target, unsigned index,
|
||||||
return ~0;
|
return ~0;
|
||||||
case 64:
|
case 64:
|
||||||
dmi_write(target, DMI_DATA0 + offset + 1, value >> 32);
|
dmi_write(target, DMI_DATA0 + offset + 1, value >> 32);
|
||||||
|
/* falls through */
|
||||||
case 32:
|
case 32:
|
||||||
dmi_write(target, DMI_DATA0 + offset, value);
|
dmi_write(target, DMI_DATA0 + offset, value);
|
||||||
}
|
}
|
||||||
|
@ -1414,11 +1416,14 @@ static void write_to_buf(uint8_t *buffer, uint64_t value, unsigned size)
|
||||||
buffer[6] = value >> 48;
|
buffer[6] = value >> 48;
|
||||||
buffer[5] = value >> 40;
|
buffer[5] = value >> 40;
|
||||||
buffer[4] = value >> 32;
|
buffer[4] = value >> 32;
|
||||||
|
/* falls through */
|
||||||
case 4:
|
case 4:
|
||||||
buffer[3] = value >> 24;
|
buffer[3] = value >> 24;
|
||||||
buffer[2] = value >> 16;
|
buffer[2] = value >> 16;
|
||||||
|
/* falls through */
|
||||||
case 2:
|
case 2:
|
||||||
buffer[1] = value >> 8;
|
buffer[1] = value >> 8;
|
||||||
|
/* falls through */
|
||||||
case 1:
|
case 1:
|
||||||
buffer[0] = value;
|
buffer[0] = value;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue