On Fri, Mar 26, 2010 at 04:06:24PM +0000, Riku Voipio wrote:
> From: Juha Riihimäki <juha.riihim...@nokia.com>
> 
> modified the arm disassembler to include the opcode binary representation 
> along
> with the symbolic disassembly.
> 
> Signed-Off-By: Riku Voipio <riku.voi...@nokia.com>
> Signed-Off-By: Juha Riihimäki <juha.riihim...@nokia.com>
> ---
>  arm-dis.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arm-dis.c b/arm-dis.c
> index 4fb899e..2b37c24 100644
> --- a/arm-dis.c
> +++ b/arm-dis.c
> @@ -4101,8 +4101,14 @@ print_insn_arm (bfd_vma pc, struct disassemble_info 
> *info)
>         In such cases, we can ignore the pc when computing
>         addresses, since the addend is not currently pc-relative.  */
>      pc = 0;
> -
> -  printer (pc, info, given);
> +    if (size == 2) {
> +        info->fprintf_func(info->stream, "[%04lx]      ",
> +                           ((unsigned long)given) & 0xffffffff);

Is the mask here correct? As far as I understand, we only want to keep
16 bits here.

> +    } else {
> +        info->fprintf_func(info->stream, "[%08lx]  ",
> +                           ((unsigned long)given) & 0xffffffff);
> +    }
> +    printer (pc, info, given);
>  
>    if (is_thumb)
>      {
> -- 
> 1.6.5
> 
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net


Reply via email to