From: Gabe Black Date: Tue, 26 Nov 2019 01:00:52 +0000 (-0800) Subject: sim: Add a function for decoding the field(s) of an m5op address. X-Git-Tag: v19.0.0.0~34 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=549e0b25e3b370e141e38f973e73adb75783fc34;p=gem5.git sim: Add a function for decoding the field(s) of an m5op address. These have at one time included both a func and subfunc, although the subfunc was unused and is now excluded. Jira Issue: https://gem5.atlassian.net/browse/GEM5-187 Change-Id: Ic35ced7a012aa72af5454768f3cbd11b431b061a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23183 Maintainer: Gabe Black Tested-by: kokoro Reviewed-by: Marjan Fariborz Reviewed-by: Jason Lowe-Power --- diff --git a/src/sim/pseudo_inst.hh b/src/sim/pseudo_inst.hh index caada36c4..44227aff1 100644 --- a/src/sim/pseudo_inst.hh +++ b/src/sim/pseudo_inst.hh @@ -86,6 +86,12 @@ struct Argument namespace PseudoInst { +static inline void +decodeAddrOffset(Addr offset, uint8_t &func) +{ + func = bits(offset, 15, 8); +} + void arm(ThreadContext *tc); void quiesce(ThreadContext *tc); void quiesceSkip(ThreadContext *tc);