From: Peter Rival <frival@zk3.dec.com>
To: rth@twiddle.net
Cc: axp-list@redhat.com
Subject: Assembly errors with lockmeter
Date: Tue, 02 Nov 1999 19:24:09 +0000 [thread overview]
Message-ID: <381F3A59.B110991E@zk3.dec.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2232 bytes --]
Hi Richard,
I've now ported most of the lockmeter code that was written at SGI
for the x86 platform over to alpha. My last stumbling block has been
the rwlocks, as they had written some cute code that worked nicely on
x86's rwlocks. I've tried to rewrite it in Alpha assembly, but am now
tripping over this one and have no clue why it's doing this. This is
done with "egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)". The code
segment is below, it's basically supposed to try once to get the read
lock so we can start a timer if it fails (to keep track of our mean and
total lock wait times):
static __inline__ int _read_try_lock_(volatile rwlock_t *lock)
{
long temp,result;
__asm__ __volatile__(
"1: ldl_l %1,%0\n"
" blbs %1,6f\n"
" subl %1,2,%1\n"
" mov %1,%2\n"
" stl_c %1,6f\n"
" beq %1,6f\n"
" mb\n"
".section .text2,\"ax\"\n"
"6:\n"
".previous"
: "=m" (__dummy_lock(lock)), "=&r" (temp), "=&r" (result)
: "m" (__dummy_lock(lock))
);
return (result); /* Was the lock grabbed? */
}
This is the error I get:
[frival@av8r kernel]$ gcc -D__KERNEL__
-I/home/frival/lockwork/linux-2.3.22/include -Wall -Wstrict-prototypes
-O2 -fno-strict-aliasing -D__SMP__ -pipe -mno-fp-regs -ffixed-8 -c -o
lockmeter.o lockmeter.c
{standard input}: Assembler messages:
{standard input}:649: Error: macro requires $at register while noat in
effect
{standard input}:655: Internal error!
Assertion failure in alpha_align at ./config/tc-alpha.c line 4518.
Please report this bug.
And finally, this is the final assembly code I get (with gcc -S):
<snip>
$_read_lock_..ng:
subq $30,32,$30
stq $26,0($30)
.prologue 1
bic $26,3,$26
stq $16,16($30)
bis $26,1,$17
1: ldl_l $2,0($16)
blbs $2,6f
subl $2,2,$2
mov $2,$1
stl_c $2,6f <-- line 649
beq $2,6f
mb
.section .text2,"ax"
6:
.previous
addl $1,$31,$1 <-- line 655
beq $1,$L944
ldq $16,16($30)
bis $31,$31,$18
bsr $26,$lstat_update..ng
br $31,$L943
<snip>
[-- Attachment #2: Type: text/html, Size: 4527 bytes --]
next reply other threads:[~1999-11-02 19:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-02 19:24 Peter Rival [this message]
1999-11-02 20:19 ` Assembly errors with lockmeter Richard Henderson
1999-11-02 20:41 ` Peter Rival
1999-11-02 20:57 ` Richard Henderson
1999-11-02 21:49 ` Cross Platform IDE Jonas Gustavsson
1999-11-03 21:32 ` Adam C Powell IV
1999-11-04 0:00 ` SV: " Jonas Gustavsson
1999-11-08 0:47 ` Assembly errors with lockmeter Richard Henderson
1999-11-08 14:03 ` Peter Rival
1999-11-24 5:27 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox