ly to be years away. In the meantime let me
> suggest a > shorter expression for doing the byte-swap operation.
> The book > “Hacker’s Delight” shows a straightforward 32-bit byte
> swap with masks > no wider than 16 bits, as follows:
> >
> > x = (x
ion.
> The book > "Hacker's Delight" shows a straightforward 32-bit byte
> swap with masks > no wider than 16 bits, as follows:
> >
> > x = (x << 24) | ((x & 0xff00) << 8) | ((x >> 8) &
> > 0xff00) | (x &g
Cc: Michael Eager ; Robinson, Paul
; Ron Brender ;
dwarf-discuss@lists.dwarfstd.org
Subject: Re: [Dwarf-Discuss] dwarf stack operator for byte swap.
On Fri, Nov 08, 2019 at 06:51:52AM +, Chirag Patel via Dwarf-Discuss wrote:
> Proposed changes to DW
ff) << 24) | ((x & 0xff00) << 8) | ((x >> 8)
> & 0xff00) | (x >> 24);
>
> Translating this into a DWARF expression, I get the following:
>
> DW_OP_dup, DW_OP_const1u 0xff, DW_OP_and, DW_OP_lit24,
> DW_OP_shl, DW_OP_swap, DW_OP_dup, DW_OP
et the following:
>
> DW_OP_dup, DW_OP_const1u 0xff, DW_OP_and, DW_OP_lit24,
> DW_OP_shl, DW_OP_swap, DW_OP_dup, DW_OP_const2u 0xff00, DW_OP_and,
> DW_OP_lit8, DW_OP_shl, DW_OP_swap, DW_OP_dup, DW_OP_lit8, DW_OP_shr,
> DW_OP_const2u 0xff00, DW_OP_and, DW_OP_swap, DW_OP
Hello Dwarf experts.
I am currently working trying to encode dwarf of binaries with having bi-endian
variables marked with DW_AT_endianity attribute.
The location calculation for some variable depends on other variable with
different endianity, also the value of this other variable is known at