https://bugs.kde.org/show_bug.cgi?id=386945

--- Comment #46 from Julian Seward <jsew...@acm.org> ---
(In reply to Mark Wielaard from comment #44)
> Created attachment 116593 [details]
> implement ldbrx as 64-bit load and Iop_Reverse8sIn64_x1
> 
> Real implementation of ldbrx as 64-bit load and Iop_Reverse8sIn64_x1.

Regardless of the fact that there are still misaligned ldbrxs to deal with,
I think this is good and should land.  I would ask:

* for "case 0x214: // ldbrx (Load Doubleword Byte-Reverse Indexed)"
  please add a comment to say that dis_int_ldst_rev's caller guarantees
  to ask for this instruction to be decoded only in 64-bit mode

* for the backend expression, it's fine, except that for
  // r = (r & 0x00000000FFFFFFFF) << 32 | (r & 0xFFFFFFFF00000000) >> 32;
  there's no need to do the masking since the shifts will remove all of
  the bits that just got masked out anyway.  So we can skip the _LI, the NOT
  and the two ANDs.

* oh .. and I think the whole thing (insn selection for Iop_Reverse8sIn64_x1)
  needs to be guarded by the is-this-64-bit-mode boolean (env->mode64 or
  something like that) since we don't want to be emitting this bit of code in
  32 bit mode.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to