diff options
Diffstat (limited to 'target/arm/tcg/translate.h')
-rw-r--r-- | target/arm/tcg/translate.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h index c1e57a5..3aa486a 100644 --- a/target/arm/tcg/translate.h +++ b/target/arm/tcg/translate.h @@ -610,6 +610,30 @@ static inline MemOp finalize_memop_pair(DisasContext *s, MemOp opc) } /** + * finalize_memop_asimd: + * @s: DisasContext + * @opc: size+sign+align of the memory operation + * + * Like finalize_memop_atom, but with atomicity of AccessType_ASIMD. + */ +static inline MemOp finalize_memop_asimd(DisasContext *s, MemOp opc) +{ + /* + * In the pseudocode for Mem[], with AccessType_ASIMD, size == 16, + * if IsAligned(8), the first case provides separate atomicity for + * the pair of 64-bit accesses. If !IsAligned(8), the middle cases + * do not apply, and we're left with the final case of no atomicity. + * Thus MO_ATOM_IFALIGN_PAIR. + * + * For other sizes, normal LSE2 rules apply. + */ + if ((opc & MO_SIZE) == MO_128) { + return finalize_memop_atom(s, opc, MO_ATOM_IFALIGN_PAIR); + } + return finalize_memop(s, opc); +} + +/** * asimd_imm_const: Expand an encoded SIMD constant value * * Expand a SIMD constant value. This is essentially the pseudocode |