[kaffe] MIPS Port Update
Warwick Hunter
whunter@agile.tv
Thu, 18 Jul 2002 08:46:16 +1000
This is a multi-part message in MIME format.
--------------010002040404080008070101
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Kevin,
The original macro only suffered from one
fault: using a MIPS IV movn instruction.
Do you think that we should abandon the
attempts to use the pocketlinux version
of macro and just fix the original fault?
During my testing I noticed that the
pocketlinux macro only works if you are
very careful which value you use as the
newVal. I used the thread-id which keeps
it happy. If one uses a constant value
it fails.
Warwick
--
Warwick Hunter Agile TV Corporation
Voice: +61 7 5584 5912 Fax: +61 7 5575 9550
mailto:whunter@agile.tv http://www.agile.tv
--------------010002040404080008070101
Content-Type: message/rfc822;
name="imap-message://whunter@surfers.oz.agile.tv/INBOX#47569"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="imap-message://whunter@surfers.oz.agile.tv/INBOX#47569"
Return-Path: <kevink@mips.com>
Received: from cart.mp.agile.tv (cart.mp.agile.tv [192.168.0.4])
by surfers.oz.agile.tv (8.11.6/8.11.2) with ESMTP id g6HClhG17439
for <whunter@oz.agile.tv>; Wed, 17 Jul 2002 22:47:43 +1000
Received: from gatekeeper.agile.tv (ns1.agile.tv [64.232.86.197])
by cart.mp.agile.tv (8.11.6/emg20020209-int) with ESMTP id g6HClg131372
for <whunter@oz.agile.tv>; Wed, 17 Jul 2002 05:47:42 -0700
Received: from mx2.mips.com (ftp.mips.com [206.31.31.227])
by gatekeeper.agile.tv (8.11.6/emg20010629-ext) with ESMTP id g6HClgc01419
for <whunter@agile.tv>; Wed, 17 Jul 2002 05:47:42 -0700
Received: from newman.mips.com (ns-dmz [206.31.31.225])
by mx2.mips.com (8.12.5/8.12.5) with ESMTP id g6HClYXb002301;
Wed, 17 Jul 2002 05:47:34 -0700 (PDT)
Received: from grendel (grendel [192.168.236.16])
by newman.mips.com (8.9.3/8.9.0) with SMTP id FAA19099;
Wed, 17 Jul 2002 05:47:34 -0700 (PDT)
Message-ID: <001601c22d90$3a721210$10eca8c0@grendel>
From: "Kevin D. Kissell" <kevink@mips.com>
To: "Warwick Hunter" <whunter@agile.tv>, "Dalibor Topic" <robilad@yahoo.com>
Cc: "Kaffe Mailing List" <kaffe@kaffe.org>
References: <20020716142121.95344.qmail@web10004.mail.yahoo.com> <3D3504EC.40708@agile.tv> <00a701c22d79$c4db3bf0$10eca8c0@grendel>
Subject: Re: [kaffe] MIPS Port Update
Date: Wed, 17 Jul 2002 14:48:05 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
> 2) The proposed code does not deal with the fact
> that the function is specified to return 1 on
> success, and zero if no exchange occurred.
I should say, it tries to do it with a C epilog:
+ (*(addr)) == (newVal) ? 1 : 0;})
But there is no guarantee that the compiler will
have tracked and preserved the value written with
the store conditional (which, being in an asm block,
might not even be treated as a "store" by the compiler
if we aren't lucky) so as to avoid re-reading *addr.
If the location is re-loaded, the comparison is not
necessarily going to provide the right response.
The operation may have succeeded, but some other
thread may have switched in and changed the value
yet again in the mean time.
One way or another, we have to base the returned
status on a comparison with the load-locked value.
[rest of my pedantic rant deleted]
Kevin K.
--------------010002040404080008070101--