Just a data point here.

I tried compiling the sources you posted.  However, you didn't
provide the value of CONST_BITS you were using.  It looks like your
snippets are from jidctint.c, so I used the value from that file
(13).  In both of your examples, I got the direct muls version, not
the __lmul__ version.

However, neither did I get the constant #-1730 to show up in my
disassembly, so perhaps my value of CONST_BITS is incorrect.  The
difference might also be because of the simpler (extracted) code I
was using, compared to your using the entire function.

-- Keith Rollin
-- Palm OS Emulator engineer

At 11:04 PM +0100 1/10/03, Jan Slodicka wrote:
It is from JPEG official library.

<SNIP>

----- Original Message -----
From: "Ben Combee" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 10:49 PM
Subject: Re: CW compiler


 At 22:19 2003-1-10 +0100, you wrote:
 >I just observed very strange thing.
 >
 >By changing the source line order the same source line (multiplication)
is
 >translated either into
 >
 >     movea.w   d4,a0
 >     move.l    a0,86(a7)
 >     move.l    a0,d0
 >     move.l    #-1730,d1
 >     jsr       __lmul__
 >     move.l    d0,d3
 >
 >or into
 >
 >     move.w    d6,d3
 >     muls.w    #-1730,d3
 >
 >The second alternative seems to be optically shorter, but it actually
uses
 >register value inherited from the previous code. That's OK.
 >What I don't understand is that in one case the multiplication is
realized
 >via muls instruction, in the other a call to the emulator is used
instead.
 Could you show the lines of code?  The first one is doing a signed 32-bit
 multiplication, while the second is doing a signed 16-bit
 multiplication.  Is it possible that with one line order, you've got a
long
 temporary result that's affecting the multiplication?

 --
 Ben Combee <[EMAIL PROTECTED]>
 CodeWarrior for Palm OS technical lead
 Palm OS programming help @ www.palmoswerks.com


 --
 For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to