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.travaglini@arm.com> Change-Id: I60189c37ffcefab991955c3d0bb560a6a79f0977 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64071 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Richard Cooper <richard.cooper@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -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 @@ class ArmRelease(SimObject):
|
||||
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) ?
|
||||
|
||||
Reference in New Issue
Block a user