All of lore.kernel.org
 help / color / mirror / Atom feed
* MIPS assembly question
@ 2007-09-20 23:14 Winson Yung
  2007-09-20 23:44 ` David Daney
  2007-09-21  9:34 ` Freddy Spierenburg
  0 siblings, 2 replies; 3+ messages in thread
From: Winson Yung @ 2007-09-20 23:14 UTC (permalink / raw)
  To: linux-mips

Hi there, I have some general mips inline assembly question regards to
32 bit atomic operation, here a section of its assembly
implementation:

                "       .set    mips3                                   \n"
                "1:     ll      %0, %2                  # __cmpxchg_u32 \n"
                "       bne     %0, %z3, 2f                             \n"
                "       .set    mips0                                   \n"
                "       move    $1, %z4                                 \n"
                "       .set    mips3                                   \n"
                "       sc      $1, %1                                  \n"
                "       beqzl   $1, 1b                                  \n"

Questions:

1) what does 'z' mean in the line of 'bne %0, %z3, 2f'?
2) Is $1 suppose to be use as an constant 1, I don't understand the
line 'sc  $1, %1'

Will appreciate if someone can point out to me a good tutorial on
explaining these little things.

Thanks!
/Winson.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-21  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-20 23:14 MIPS assembly question Winson Yung
2007-09-20 23:44 ` David Daney
2007-09-21  9:34 ` Freddy Spierenburg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.