Merge pull request #216 from kaspar030/fix_some_fallthroughs
target/riscv: add some switch fallthrough commentssba_tests
commit
0c8235d11f
|
@ -698,6 +698,7 @@ static riscv_reg_t read_abstract_arg(struct target *target, unsigned index,
|
|||
return ~0;
|
||||
case 64:
|
||||
value |= ((uint64_t) dmi_read(target, DMI_DATA0 + offset + 1)) << 32;
|
||||
/* falls through */
|
||||
case 32:
|
||||
value |= dmi_read(target, DMI_DATA0 + offset);
|
||||
}
|
||||
|
@ -714,6 +715,7 @@ static int write_abstract_arg(struct target *target, unsigned index,
|
|||
return ERROR_FAIL;
|
||||
case 64:
|
||||
dmi_write(target, DMI_DATA0 + offset + 1, value >> 32);
|
||||
/* falls through */
|
||||
case 32:
|
||||
dmi_write(target, DMI_DATA0 + offset, value);
|
||||
}
|
||||
|
@ -1617,11 +1619,14 @@ static void write_to_buf(uint8_t *buffer, uint64_t value, unsigned size)
|
|||
buffer[6] = value >> 48;
|
||||
buffer[5] = value >> 40;
|
||||
buffer[4] = value >> 32;
|
||||
/* falls through */
|
||||
case 4:
|
||||
buffer[3] = value >> 24;
|
||||
buffer[2] = value >> 16;
|
||||
/* falls through */
|
||||
case 2:
|
||||
buffer[1] = value >> 8;
|
||||
/* falls through */
|
||||
case 1:
|
||||
buffer[0] = value;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue