Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/64914?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one. )Change subject: arch-arm: Use ThreadContext in ArmISA::currEL implementation
......................................................................

arch-arm: Use ThreadContext in ArmISA::currEL implementation

This is partly reverting a previous patch [1] which was
moving most functionalities within the ISA class.
This evidently does not work well with thread context implementations
which are bypassed by the ISA objects as noted by [2]

[1]: https://gem5-review.googlesource.com/c/public/gem5/+/53624
[2]: https://gem5-review.googlesource.com/c/public/gem5/+/64653

Change-Id: I0c91c76f690542219ffbbf53359531d9dea9e86d
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64914
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Yu-hsin Wang <yuhsi...@google.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M src/arch/arm/utility.cc
1 file changed, 25 insertions(+), 2 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  Yu-hsin Wang: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/utility.cc b/src/arch/arm/utility.cc
index f5d37fe..d7185f2 100644
--- a/src/arch/arm/utility.cc
+++ b/src/arch/arm/utility.cc
@@ -123,8 +123,8 @@
 ExceptionLevel
 currEL(const ThreadContext *tc)
 {
-    return static_cast<ArmISA::ISA *>(
-        const_cast<ThreadContext *>(tc)->getIsaPtr())->currEL();
+    CPSR cpsr = tc->readMiscRegNoEffect(MISCREG_CPSR);
+    return opModeToEL((OperatingMode)(uint8_t)cpsr.mode);
 }

 bool

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64914?usp=email 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: I0c91c76f690542219ffbbf53359531d9dea9e86d
Gerrit-Change-Number: 64914
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to