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

Change subject: arch-arm: Add the remove method to the ArmRelease class
......................................................................

arch-arm: Add the remove method to the ArmRelease class

This allows to remove an extension from a release object

Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Change-Id: I60189c37ffcefab991955c3d0bb560a6a79f0977
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64071
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-by: Richard Cooper <richard.coo...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/arm/ArmSystem.py
1 file changed, 26 insertions(+), 1 deletion(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  Richard Cooper: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/ArmSystem.py b/src/arch/arm/ArmSystem.py
index 0179552..3994aee 100644
--- a/src/arch/arm/ArmSystem.py
+++ b/src/arch/arm/ArmSystem.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2012-2013, 2015-2021 ARM Limited
+# Copyright (c) 2009, 2012-2013, 2015-2022 ARM Limited
 # All rights reserved.
 #
 # The license below extends only to copyright in the software and shall
@@ -91,6 +91,14 @@
         if new_ext.value not in [ext.value for ext in self.extensions]:
             self.extensions.append(new_ext)

+    def remove(self, ext: ArmExtension) -> None:
+        """
+        Remove the provided extension (ArmExtension) from the system
+        """
+        for curr_ext in list(self.extensions):
+            if curr_ext.value == ext.value:
+                self.extensions.remove(curr_ext)
+
     def has(self, new_ext: ArmExtension) -> bool:
         """
         Is the system implementing the provided extension (ArmExtension) ?

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64071?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: I60189c37ffcefab991955c3d0bb560a6a79f0977
Gerrit-Change-Number: 64071
Gerrit-PatchSet: 2
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: Richard Cooper <richard.coo...@arm.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