Merge pull request #216 from kaspar030/fix_some_fallthroughs

target/riscv: add some switch fallthrough comments
sba_tests
Tim Newsome 2018-02-28 12:31:22 -08:00 committed by GitHub
commit 0c8235d11f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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;