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~