[PATCH 1/1] LEON3: UT699 and GR712 sleep-mode d-cache fix

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Mar 31 10:26:38 UTC 2014


On 2014-03-31 12:17, Daniel Cederman wrote:
> Branch always is a special case in which the ",a" causes the delay instruction
> to not be executed. From the Sparc architecture manual:
>
> "However, a bit in the delayed control-transfer instruction can cause the delay
> instruction to be annulled (that is, to have no effect) if the branch is not
> taken (or in the branch always case, if the branch is
> taken)."

Ok, I didn't have this "(or in the branch always case, if the branch is taken)" 
in my documentation.

>
> So I think it should be safe to remove the nop instruction.

Since nobody knows which instruction will be after "ba,a" I think we should 
keep the nop.

>
> On 2014-03-31 12:03, Sebastian Huber wrote:
>> On 2014-03-31 11:48, Daniel Cederman wrote:
>>> See errata of respective chip. Some code-cleanup as well.
>>> ---
>>>   c/src/lib/libbsp/sparc/leon3/startup/bspidle.S |    7 ++-----
>>>   1 file changed, 2 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
>>> b/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
>>> index 714d4e5..0924658 100644
>>> --- a/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
>>> +++ b/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
>>> @@ -23,8 +23,5 @@
>>>   SYM(bsp_idle_thread):
>>>   SYM(leon3_power_down_loop):
>>>   pwdloop:  mov   %g0, %asr19
>>> -          ba    pwdloop
>>> -          nop
>>> -          retl
>>> -          nop
>>> -
>>> +          lda   [%sp] 1, %g0            ! Needed for UT699 and GR712
>>> +          ba,a    pwdloop
>>>
>>
>> If I understand this ",a" notation correctly, then the instruction
>> following the branch is not executed in case the branch is not taken.
>> Since we branch always, this ",a" seems to be superfluous.  Is it safe
>> to remove the nop instruction in the delay slot here?
>>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel


-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list