MIPS assembly question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux