Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/9361

Change subject: cpu: Proposed fix for backwards compatibility in proto/inst.proto.
......................................................................

cpu: Proposed fix for backwards compatibility in proto/inst.proto.

I haven't tested this at all, but this may fix backwards compatibility
in inst.proto by removing the oneof construct.

Change-Id: Iba19744791c2c577c3b442402f8cc6dcef8550bd
---
M src/proto/inst.proto
1 file changed, 7 insertions(+), 4 deletions(-)



diff --git a/src/proto/inst.proto b/src/proto/inst.proto
index d561661..2a5dd95 100644
--- a/src/proto/inst.proto
+++ b/src/proto/inst.proto
@@ -52,10 +52,13 @@

 message Inst {
   required uint64 pc = 1;
-  oneof inst_oneof {
-    fixed32 inst = 2;
-    bytes inst_bytes = 9;
-  }
+
+  // Either inst or inst_bytes must be used, but never both. That should be
+ // enforced by the oneof keyword, but that's not supported in all versions
+  // of protobuf syntax we need to work with for now.
+  optional fixed32 inst = 2;
+  optional bytes inst_bytes = 9;
+
   optional uint32 nodeid = 3;
   optional uint32 cpuid = 4;
   optional fixed64 tick = 5;

--
To view, visit https://gem5-review.googlesource.com/9361
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: Iba19744791c2c577c3b442402f8cc6dcef8550bd
Gerrit-Change-Number: 9361
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