[Top] [All Lists]

Re: Regarding the LL & SC instructions

To: "karthikeyan natarajan" <>, <>
Subject: Re: Regarding the LL & SC instructions
From: "Kevin D. Kissell" <>
Date: Sun, 4 Jan 2004 22:47:06 +0100
Organization: MIPS Technologies Inc.
Original-recipient: rfc822;
References: <>
You can modify any, all, or none of the bytes in a word loaded/stored
with LL/SC.  What you *can't* do is independently  LL/SC individual 
bytes within the same memory word, but operationally, this is of little
consequence.  If you want to atomically modify a byte, you LL the word
containing the byte, modify the byte in question, and SC the word.
If the SC succeeds, all is as you wish.  If the SC fails, you need to
retry the whole sequence.

----- Original Message ----- 
From: "karthikeyan natarajan" <>
To: <>
Sent: Sunday, January 04, 2004 10:09
Subject: Regarding the LL & SC instructions

> Hi All,
>     Seems that LL & SC instrutions operate on a 'word'
> data.
>     Can we use the same instructions to do a atomic
> increment on a 'byte' data. If not, are there any
> specific instructions to operate on a byte data?
> (Like, LLD & SCD for doubleword data) or else, any 
> method to achieve this using the LL & SC instr?
> Thanks much,
> -karthi
> =====
> The expert at anything was once a beginner
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping" 
> your friends today! Download Messenger Now 

<Prev in Thread] Current Thread [Next in Thread>