harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xiaoming gu" <xiaoming...@gmail.com>
Subject Re: FW: [general][performance] Stefan Krause's Harmony performance evaluation
Date Mon, 07 Jul 2008 06:48:24 GMT
Hi, all. I have two problems now.

1. Round-up problem with division and shift right that "The division
operator rounds towards 0, but the right
shift operator (>>) rounds towards negative infinity." For example -5/4=-1
but -5>>2=-2.

2. When the divisor is negative, how to deal with the shift operation? It's
meaningless to do shift with a
number of negative bits.

Any comments? Thanks.

Xiaoming

On Mon, Jul 7, 2008 at 11:57 AM, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:

> On Mon, Jul 7, 2008 at 11:31 AM, xiaoming gu <xiaoming.gu@gmail.com>
> wrote:
> > With testing, I find SAR is the "signed shift right" to replace div. So
> the
> > comments about SAR and SHR in Enc_defs.h are misplaced.
>
> So I assume you will correct it in your patch. :)
>
> Thanks,
> xiaofeng
>
> > Xiaoming
> >
> > On Mon, Jul 7, 2008 at 8:24 AM, xiaoming gu <xiaoming.gu@gmail.com>
> wrote:
> >
> >> Hi, everyone. Which one is signed shift right, SAR or SHR? It seems
> there
> >> are some conflicts between
> >> the definitions (in Enc_defs.h) and the usages (in
> >> Ia32InstCodeSelector.cpp). Thanks.
> >>
> >> Xiaoming
> >>
> >>
> >> On Sun, Jul 6, 2008 at 4:47 PM, Egor Pasko <egor.pasko@gmail.com>
> wrote:
> >>
> >>> On the 0x479 day of Apache Harmony xiaoming gu wrote:
> >>> > Aleksey, one question. Is there any easy way to know which binary
> >>> > instructions are generated at runtime? Thanks.
> >>>
> >>> Use command line options [1].
> >>>
> >>> I suggest this set:
> >>>
> >>> -Xem:server_static -XX:jit.p.filter=.main
> >>> -XX:jit.p.arg.log=ct,irdump,dotdump
> >>>
> >>>
> >>> [1] http://harmony.apache.org/cmd_options.html
> >>>
> >>>
> >>> > Xiaoming
> >>> >
> >>> > On Fri, Jul 4, 2008 at 6:17 PM, xiaoming gu <xiaoming.gu@gmail.com>
> >>> wrote:
> >>> >
> >>> > > Got it. I'll take the 1st way and the left work is pretty clear.
> >>> Thanks.
> >>> > >
> >>> > > Xiaoming
> >>> > >
> >>> > >
> >>> > > On Fri, Jul 4, 2008 at 6:11 PM, Aleksey Shipilev <
> >>> > > aleksey.shipilev@gmail.com> wrote:
> >>> > >
> >>> > >> On Fri, Jul 4, 2008 at 2:04 PM, Aleksey Shipilev
> >>> > >> <aleksey.shipilev@gmail.com> wrote:
> >>> > >> > do "shl reg,<value>"
> >>> > >> Of course, it's "SHIFT RIGHT", so "shr reg, <value>".
> >>> > >>
> >>> > >> Thanks,
> >>> > >> Aleksey.
> >>> > >>
> >>> > >
> >>> > >
> >>>
> >>> --
> >>> Egor Pasko
> >>>
> >>>
> >>
> >
>
>
>
> --
> http://xiao-feng.blogspot.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message