Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/12168

Change subject: x86: Example gcc8 fix.
......................................................................

x86: Example gcc8 fix.

Change-Id: I18820595aeea3223a47cca3da4b0874c7a1360d8
---
M src/arch/x86/decoder.hh
M src/arch/x86/types.hh
2 files changed, 3 insertions(+), 1 deletion(-)



diff --git a/src/arch/x86/decoder.hh b/src/arch/x86/decoder.hh
index 3630ea8..c0b30b5 100644
--- a/src/arch/x86/decoder.hh
+++ b/src/arch/x86/decoder.hh
@@ -239,7 +239,7 @@
         outOfBytes(true), instDone(false),
         state(ResetState)
     {
-        memset(&emi, 0, sizeof(emi));
+        emi.reset();
         mode = LongMode;
         submode = SixtyFourBitMode;
         emi.mode.mode = mode;
diff --git a/src/arch/x86/types.hh b/src/arch/x86/types.hh
index 6e1b1cf..b35d496 100644
--- a/src/arch/x86/types.hh
+++ b/src/arch/x86/types.hh
@@ -199,6 +199,8 @@
     //The intermediate structure used by the x86 decoder.
     struct ExtMachInst
     {
+        void reset() { bzero(static_cast<void *>(this), sizeof(*this)); }
+
         //Prefixes
         LegacyPrefixVector legacy;
         Rex rex;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12168
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I18820595aeea3223a47cca3da4b0874c7a1360d8
Gerrit-Change-Number: 12168
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to