cpn/database: include data_width in the fsppilot during prune step

During the prune step the data_width of the injected location was not
propagated before. It is now stored in fsppilot (database layout change!) and
sent in the fsppilot protobuf message.

Change-Id: I0562f6fc8957adea0f8a9fb63469ca5e3f4b7b2d
This commit is contained in:
Christian Dietrich
2013-09-10 14:54:33 +02:00
parent 60bf0bae69
commit d26fc28fa4
5 changed files with 16 additions and 10 deletions

View File

@ -30,11 +30,11 @@ public:
// <reg> | <offset>
return (id << 4) | (offset / 8);
}
// does not recreate width or mask
static reginfo_t fromDataAddress(int addr) {
static reginfo_t fromDataAddress(int addr, int width) {
int id = addr >> 4;
byte_t offset = (addr & 0xf) * 8;
return reginfo_t(id, 0, offset);
return reginfo_t(id, width * 8, offset);
}
reginfo_t(int id=-1, regwidth_t width = 32, byte_t offs = 0)