[prev in list] [next in list] [prev in thread] [next in thread] 

List:       strace
Subject:    Re: [PATCH] Add support for Altera's Nios-II softcore architecture
From:       "Dmitry V. Levin" <ldv () altlinux ! org>
Date:       2014-02-05 4:33:52
Message-ID: 20140205043352.GA26980 () altlinux ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wed, Feb 05, 2014 at 01:07:51AM -0200, Ezequiel GarcĂ­a wrote:
> On 4 February 2014 20:01, Dmitry V. Levin <ldv@altlinux.org> wrote:
> > On Sun, Jan 26, 2014 at 09:59:07PM -0300, Ezequiel Garcia wrote:
> >> +/* Nios-II specific compare and exchange syscall for atomic operations */
> >> +int sys_nios2cmpxchg(struct tcb *tcp)
> >> +{
> >> +     if (entering(tcp)) {
> >> +             tprintf(", 0x%lx, %#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1],
> >> +                     tcp->u_arg[2]);
> >> +     }
> >> +
> >> +     return RVAL_HEX;
> >> +}
> >
> > This is confusing:
> > - output starts with ", ";
> 
> Ah, yes. Fixed.
> 
> > - both 0x%lx and %#lx are used in the same format line.
> 
> Hm? I took it from the cmpxchg analogue syscall in or1k, which seemed
> correct to me.
> 
> 0x%lx is for the address, and %#lx for the old and new values.

%#lx is the same as 0x%lx unless the value is zero,
so the use of 0x%lx is rarely justified.


-- 
ldv

[Attachment #5 (application/pgp-signature)]

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk

_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic