diff options
author | Taylor Simpson <ltaylorsimpson@gmail.com> | 2024-02-13 21:27:24 -0700 |
---|---|---|
committer | Brian Cain <bcain@quicinc.com> | 2024-05-05 16:22:07 -0700 |
commit | 850d06225b599eda8c519681cb39f5dec0dbe9a0 (patch) | |
tree | 3dcd47293d786fe5748644755bf5258832bcadbf /target/hexagon | |
parent | 763d2ce7c4f5bc6617b5c17a40f2faaf03fecb8e (diff) | |
download | qemu-850d06225b599eda8c519681cb39f5dec0dbe9a0.zip qemu-850d06225b599eda8c519681cb39f5dec0dbe9a0.tar.gz qemu-850d06225b599eda8c519681cb39f5dec0dbe9a0.tar.bz2 |
Hexagon (target/hexagon) Pass P0 explicitly to helpers that need it
Rather than reading P0 from the env, pass it explicitly
Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Tested-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Brian Cain <bcain@quicinc.com>
Message-Id: <20240214042726.19290-2-ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Diffstat (limited to 'target/hexagon')
-rwxr-xr-x | target/hexagon/hex_common.py | 10 | ||||
-rw-r--r-- | target/hexagon/macros.h | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 9e7f613..63d18f7 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon/hex_common.py @@ -197,6 +197,10 @@ def get_tagimms(): return dict(zip(tags, list(map(compute_tag_immediates, tags)))) +def need_p0(tag): + return "A_IMPLICIT_READS_P0" in attribdict[tag] + + def need_slot(tag): if ( "A_CVI_SCATTER" not in attribdict[tag] @@ -1134,6 +1138,12 @@ def helper_args(tag, regs, imms): "tcg_constant_tl(ctx->next_PC)", "target_ulong next_PC" )) + if need_p0(tag): + args.append(HelperArg( + "i32", + "hex_pred[0]", + "uint32_t P0" + )) if need_slot(tag): args.append(HelperArg( "i32", diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index 1376d6c..aedc863 100644 --- a/target/hexagon/macros.h +++ b/target/hexagon/macros.h @@ -1,5 +1,5 @@ /* - * Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. + * Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -358,7 +358,7 @@ static inline TCGv gen_read_ireg(TCGv result, TCGv val, int shift) #endif #define fREAD_PC() (PC) -#define fREAD_P0() (env->pred[0]) +#define fREAD_P0() (P0) #define fCHECK_PCALIGN(A) |