[rtems-tools commit] covoar/Target_aarch64: Swap QEMU taken/not taken bits

Joel Sherrill joel at rtems.org
Fri Apr 16 22:28:59 UTC 2021


Module:    rtems-tools
Branch:    master
Commit:    0c4884a0d071dd56e6eb8f67ea6d1a5092d6830e
Changeset: http://git.rtems.org/rtems-tools/commit/?id=0c4884a0d071dd56e6eb8f67ea6d1a5092d6830e

Author:    Alex White <alex.white at oarcorp.com>
Date:      Fri Apr 16 13:24:15 2021 -0500

covoar/Target_aarch64: Swap QEMU taken/not taken bits

This overrides the `TargetBase` behavior to allow branches to be marked
correctly as either taken or not taken.

Closes #4387

---

 tester/covoar/Target_aarch64.cc | 11 +++++++++++
 tester/covoar/Target_aarch64.h  |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/tester/covoar/Target_aarch64.cc b/tester/covoar/Target_aarch64.cc
index 64472d6..4d16456 100644
--- a/tester/covoar/Target_aarch64.cc
+++ b/tester/covoar/Target_aarch64.cc
@@ -12,6 +12,7 @@
 
 #include <rld.h>
 
+#include "qemu-traces.h"
 #include "Target_aarch64.h"
 
 namespace Target {
@@ -90,6 +91,16 @@ namespace Target {
     );
   }
 
+  uint8_t Target_aarch64::qemuTakenBit()
+  {
+    return TRACE_OP_BR1;
+  }
+
+  uint8_t Target_aarch64::qemuNotTakenBit()
+  {
+    return TRACE_OP_BR0;
+  }
+
   TargetBase *Target_aarch64_Constructor(
     std::string          targetName
   )
diff --git a/tester/covoar/Target_aarch64.h b/tester/covoar/Target_aarch64.h
index 26fedb6..08bd1fb 100644
--- a/tester/covoar/Target_aarch64.h
+++ b/tester/covoar/Target_aarch64.h
@@ -54,6 +54,12 @@ namespace Target {
       const char* const instruction
     );
 
+    /* Documentation inherited from base class */
+    uint8_t qemuTakenBit() override;
+
+    /* Documentation inherited from base class */
+    uint8_t qemuNotTakenBit() override;
+
   private:
 
   };



More information about the vc mailing list