[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] target-arm: introduce be8 tbflag
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] target-arm: introduce be8 tbflag |
Date: |
Mon, 21 Apr 2014 11:29:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 04/21/2014 10:43 AM, Paolo Bonzini wrote:
> @@ -1157,6 +1161,9 @@ static inline void cpu_get_tb_cpu_state(CPUARMState
> *env, target_ulong *pc,
> if (privmode) {
> *flags |= ARM_TBFLAG_PRIV_MASK;
> }
> + if (env->uncached_cpsr & CPSR_E) {
> + *flags |= ARM_TBFLAG_BE8_MASK;
> + }
> if (env->vfp.xregs[ARM_VFP_FPEXC] & (1 << 30)) {
> *flags |= ARM_TBFLAG_VFPEN_MASK;
> }
Perhaps out of scope here, but we really should write to *flags only once.
Since we disable strong aliasing info, these reads and writes are dependent
> + int opc = (OPC) | (s->be8 ? MO_BE : MO_LE); \
TCGMemOp for the type here. I also suggest making s->be8 be a TCGMemOp, so
that all of these become (OPC) | s->be8.
> /* setend */
> - if (((insn >> 9) & 1) != s->bswap_code) {
> + if (((insn >> 9) & 1) != s->be8) {
Adding an extra comparison here, but there are certainly more instances of
memory operations issued than setend insns issued.
> + dc->be8 = ARM_TBFLAG_BE8(tb->flags);
Incorporating the ternary op here instead, once for the TB.
r~