Giacomo Travaglini has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/51947 )
Change subject: arch: Fix serialization/deserialization of Vector registers
......................................................................
arch: Fix serialization/deserialization of Vector registers
This bug has been introduced by [1].
Without this fix a vector register is only partially unserialized,
effectively
breaking checkpoiting for vectored applications. For example if I am
initializing a vector register with the following checkpointed value:
0xaaaaaaaa_aaaaaaaa_aaaaaaaa_aaaaaaaa
The ParseParam logic will produce instead
0xaaaaaaaa_aaaaaaaa_00000000_00000000
[1]: https://gem5-review.googlesource.com/c/public/gem5/+/41994
Change-Id: I5010d9f39d57fcee390e7419a64dbcd293e51fa0
Signed-off-by: Giacomo Travaglini <[email protected]>
---
M src/arch/generic/vec_reg.hh
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/arch/generic/vec_reg.hh b/src/arch/generic/vec_reg.hh
index 1bc9099..34ba554 100644
--- a/src/arch/generic/vec_reg.hh
+++ b/src/arch/generic/vec_reg.hh
@@ -238,7 +238,7 @@
for (int i = 0; i < Sz; i++) {
uint8_t b = 0;
- if (2 * i < value.size())
+ if (2 * i < str.size())
b = stoul(str.substr(i * 2, 2), nullptr, 16);
value.template as<uint8_t>()[i] = b;
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51947
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5010d9f39d57fcee390e7419a64dbcd293e51fa0
Gerrit-Change-Number: 51947
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s