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

--- Comment #51 from Mark Wielaard <m...@klomp.org> ---
(In reply to Carl Love from comment #48)
> I think if you were to call IRExpr_Load to do the load as follows:
> 
>   /* Load the value with the bytes reversed by doing a BE load on an LE
> machine
>      and a LE load on a BE machine.  */  
>   if (host_endness == VexEndnessBE)                                         
> 
>      assign( dw1, IRExpr_Load(Iend_LE, Ity_I64, mkexpr(EA)));               
> 
>   else                                                                      
> 
>      assign( dw1, IRExpr_Load(Iend_BE, Ity_I64, mkexpr(EA))); 
>   
>   putIReg( rD_addr, mkexpr(dw1) );
> 
> You wouldn't actually need to do the byte reverse with Iop_Reverse8sIn64_x1
> as the value would be loaded with the bytes reversed already.

I tried this, but seem to hit the following in the host_ppc_isel.c backend:

 static HReg iselWordExpr_R_wrk ( ISelEnv* env, const IRExpr* e,
                                 IREndness IEndianess )

[...]
   /* --------- LOAD --------- */
   case Iex_Load: {
      HReg      r_dst;
      PPCAMode* am_addr;
      if (e->Iex.Load.end != IEndianess)
         goto irreducible;

Either I am misunderstanding how the IEndianess is passed around, or it isn't
actually possible to have a different endian load from the arch endianness.

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

Reply via email to