commit | a8e8d64e5d52647d9114af97c66d4383be37912f | [log] [tgz] |
---|---|---|
author | Angie Lee <peiyinglee@google.com> | Wed May 04 06:22:09 2022 +0000 |
committer | Angie Lee <peiyinglee@google.com> | Mon May 09 08:47:45 2022 +0000 |
tree | de555f5e09147c910626e5735335ee50761209b9 | |
parent | dfc8614ee289f11fa73ee5f54eb65f9eaad2d854 [diff] |
fastmodel: Fix an index parsing bug on PL330::gem5_getPort Change-Id: I2cf1abb0eb21c6bd65f81628be52650ef9250fbb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59369 Maintainer: Gabe Black <gabe.black@gmail.com> Reviewed-by: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc index dc3f9ec..e582404 100644 --- a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc +++ b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
@@ -246,7 +246,7 @@ port = suffix[0] - '0'; } else if (suffix.size() == 2 && isdigit(suffix[0]) && isdigit(suffix[1])) { - port = (suffix[1] - '0') * 10 + (suffix[0] - '0'); + port = (suffix[0] - '0') * 10 + (suffix[1] - '0'); } if (port != -1 && port < irqPort.size()) return *irqPort[port].at(idx);