harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Chow" <simon.harm...@gmail.com>
Subject Re: [drlvm][optimizer] What does 'Modifier' mean?
Date Thu, 10 Jan 2008 13:45:49 GMT
I got it! Thanks!

On 09 Jan 2008 00:32:30 +0300, Egor Pasko <egor.pasko@gmail.com> wrote:
>
> On the 0x3C5 day of Apache Harmony Simon Chow wrote:
> > I finds that an 'Operation' instance contains opcode, modifer, typetag
> in
> > optimizer of Harmony. Each of them is in a enum set.
> > My understanding is that opcodes are the HIR elements of Harmony
> optimizer,
> > and typetag is the result type of this operator, are these right?
>
> yes, you are right
>
> > And for modifer, I do not know what it means. Anyone can help me for
> this?
>
> Simon,
>
> modifiers are intended to modify sematics of instructions
> slightly. That allows us to avoid creating great lots of opcodes.
>
> for example, ComparisonModifier indicates what kind of comparison it
> is, whether comparison is signed, etc., while opcode is the same:
> Op_Cmp.
>
> enum ComparisonModifier {
>     Cmp_EQ              = 0x1 << 4,
>     Cmp_NE_Un           = 0x2 << 4,
>     Cmp_GT              = 0x3 << 4,
>     Cmp_GT_Un           = 0x4 << 4,
> ...
> };
>
> jitrino/src/optimizer/Opcode.h lists the modifiers. All modifiers
> together behave like a single mask, hence you can change one modifier
> having others unchanged.
>
> --
> Egor Pasko
>
>


-- 
>From : Simon.Chow@Software School of Fudan University

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