Re: A few Decstation questions.
Len Sorensen wrote:
> On Wed, Apr 09, 2003 at 12:40:28AM +0200, Guido Guenther wrote:
> > Please try:
> > http://honk.physik.uni-konstanz.de/linux-mips/kernels/kernel-image-2.4.19-r3k-kn02_2.4.19-0.020911.7_mipsel.deb
>
> Is there any way to write a small assembly program that tests for ll/sc
> support, rahter than trying to instlal libc6 2.3.1 and smashing the
> system to bits? :)
Something like this (untested) will check for basic operation.
.ent main
.globl main
main:
addiu $29, -16
li $8, 42
.set noreorder
sw $8, 0($29)
nop
.set mips2
ll $2, 0($29)
nop
sc $2, 0($29)
nop
.set mips0
.set reorder
addiu $29, 16
jr $31
.end main
Without ll/sc support, this should crash with SIGILL. Otherwise, it
returns 1 if the ll/sc sequence was atomic and 0 if it wasn't. The
latter should almost never happen.
Thiemo
Reply to: