diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2005-09-12 22:53:57 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2005-09-12 22:53:57 -0400 |
commit | d4de2ba0b47cfbba4403bd010f910a60e6e89b9c (patch) | |
tree | f06e1d53a2946825d177e1543f36de46471571d7 /dev/ide_ctrl.cc | |
parent | 00a2e4a1203e8d39290e917e505ecd1d2a597b5c (diff) | |
download | gem5-d4de2ba0b47cfbba4403bd010f910a60e6e89b9c.tar.xz |
only set an approriately sized piece of data. so break where appropriate
Again... how did this work?
--HG--
extra : convert_revision : 06dcab4ac9f5760c9847d0fa47fea67c4a46544a
Diffstat (limited to 'dev/ide_ctrl.cc')
-rw-r--r-- | dev/ide_ctrl.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dev/ide_ctrl.cc b/dev/ide_ctrl.cc index 6aac136a6..9aa3094ab 100644 --- a/dev/ide_ctrl.cc +++ b/dev/ide_ctrl.cc @@ -302,8 +302,10 @@ IdeController::writeConfig(int offset, int size, const uint8_t *data) switch(size) { case sizeof(uint8_t): config_regs.data[config_offset] = *data; + break; case sizeof(uint16_t): *(uint16_t*)&config_regs.data[config_offset] = *(uint16_t*)data; + break; case sizeof(uint32_t): *(uint32_t*)&config_regs.data[config_offset] = *(uint32_t*)data; break; |