libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libjit] incorrect _jit_load_opcode call in jit-rules-interp.c


From: Jakob Löw
Subject: Re: [Libjit] incorrect _jit_load_opcode call in jit-rules-interp.c
Date: Fri, 26 Oct 2018 19:01:48 +0200

Hey,

gentle reminder that this PR still exists too:
https://github.com/ademakov/libjit/pull/15

The description focuses a bit on the new stuff it allows. But more
importantly it implements nesting, which was not implemented in any
architecture except x86.
I'll attach a small C file which I used to test it on x86, x86-64 and
the interpreter.

- Jakob

On Thu, 2018-10-25 at 13:20 +0300, Aleksey Demakov wrote:
> Hi Vladimir,
> 
> I pushed the patch, thanks for reminding me.
> 
> Regards,
> Aleksey
> On Wed, Oct 24, 2018 at 7:09 PM Vladimir Kazanov <address@hidden
> > wrote:
> > 
> > Hi all!
> > 
> > I am trying to reuse the library in my project. Works as charm, I
> > really like it, apart from non-working interpreter mode problem.
> > 
> > Jakob's patch fixes the problem but I still have questions:
> > 
> > 1. Is there going to be an official stable release?
> > 2. Is the project alive?
> > 
> > Just checking.
> > 
> > For my current purproses libjit is fine as it is but introducing it
> > to more projects in my company might be problematic given how long
> > this critical patch is hanging.
> > 
> > Thank you,
> > Vladimir
> > 
> > On Sun, Sep 16, 2018 at 11:50 PM Jakob Löw <address@hidden> wrote:
> > > 
> > > _jit_load_opcode is given four arguments in jit-rules-interp.c,
> > > but
> > > it's definition only takes two. This is a simple patch to fix
> > > this.
> > > 
> > > 
> > > 
> > > diff --git a/ChangeLog b/ChangeLog
> > > index 2cf222d..87f1368 100644
> > > --- a/ChangeLog
> > > +++ b/ChangeLog
> > > @@ -1,3 +1,8 @@
> > > +2018-09-17  Jakob Löw  <address@hidden>
> > > +
> > > +       * jit/jit-rules-interp.c: Fix the call to
> > > _jit_load_opcode
> > > passing more
> > > +       arguments than needed.
> > > +
> > >  2018-09-01  Ken Brown  <address@hidden>
> > > 
> > >         * jit/jit-apply-x86.h: Remove reference to
> > > __CYGWIN32__.  This
> > > is
> > > diff --git a/jit/jit-rules-interp.c b/jit/jit-rules-interp.c
> > > index 1465cfc..25c7917 100644
> > > --- a/jit/jit-rules-interp.c
> > > +++ b/jit/jit-rules-interp.c
> > > @@ -975,7 +975,7 @@ load_value(jit_gencode_t gen, jit_value_t
> > > value,
> > > int index)
> > >                         default:
> > >                                 return;
> > >                         }
> > > -                       opcode = _jit_load_opcode(opcode, value-
> > > >type,
> > > value, 0);
> > > +                       opcode = _jit_load_opcode(opcode, value-
> > > > type);
> > > 
> > >                         offset = value->frame_offset;
> > >                 }
> > >                 else
> > > @@ -995,7 +995,7 @@ load_value(jit_gencode_t gen, jit_value_t
> > > value,
> > > int index)
> > >                         default:
> > >                                 return;
> > >                         }
> > > -                       opcode = _jit_load_opcode(opcode, value-
> > > >type,
> > > value, 0);
> > > +                       opcode = _jit_load_opcode(opcode, value-
> > > > type);
> > > 
> > >                         offset = -(value->frame_offset + 1);
> > >                 }
> > > 

Attachment: test-nesting.c
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]