[Top] [All Lists]

RE: Question about generic\time.c 2.4.17

To: "Zajerko-McKee, Nick" <>
Subject: RE: Question about generic\time.c 2.4.17
From: "Maciej W. Rozycki" <>
Date: Wed, 24 Jul 2002 17:19:54 +0200 (MET DST)
In-reply-to: <>
Organization: Technical University of Gdansk
On Wed, 24 Jul 2002, Zajerko-McKee, Nick wrote:

> Thanks for the reply.   No, the code wasn't too obvious.  I went through the
> gas info page to try to understand the inline assembler options + see mips
> run.  I believe the code is used in the MIPS32 condition, which is what mode
> I'm building for...  

 For the 32-bit mode, not necessarily on a MIPS32 processor. 

> so the result is res = (high |low)/ base ?

 Strictly speaking, res = (high:low) / base and the result is (high:low) %
base.  That's a macro, hence a bit weird semantics (two results are
actually provided), but it makes the use easier.  A few architectures
provide such an operation in hardware.

> What had me confused was high and low are also modified as part of the
> function.

 That's just how the algorithm works.  These are local variables anyway.

+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

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