9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] JIT (mostly off topic)
Date: Tue,  9 Sep 2014 21:48:14 -0700	[thread overview]
Message-ID: <20140910044814.78442B827@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Tue, 09 Sep 2014 22:45:01 BST." <5027045b88fe7d178a0926131e4205f1@quintile.net>

On Tue, 09 Sep 2014 22:45:01 BST "Steve Simon" <steve@quintile.net> wrote:
> Years ago The Commander and Bart Locanthi used JIT
> in the form of some C that write machine code into an
> array of chars, cast it to a function pointer, and called it.
> (I appologise if the details are not correct but this is the idea).
>
> I have a need for such a thing again - trying to speed up
> a compressed video decoder.
>
> Anyone done such a thing this millenium? Does the x86 data execution
> prevention mean you just cannot do this - my targets are desktop OSs
> other than plan9 (sadly).

Have you looked at libjit or luajit? There are a bunch of
projects using JIT on the fly!  You may also want to look at
Nils Holm's subc (a 5Kloc compiler for a subset of C +
codegens for 386,arm,x86-64, each in 260..427 lines).  For an
example of generating assembly code using C functions.



      parent reply	other threads:[~2014-09-10  4:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 21:45 Steve Simon
2014-09-09 22:04 ` Aram Hăvărneanu
2014-09-09 22:09 ` Daniel Peyrolon
2014-09-09 22:18 ` Skip Tavakkolian
2014-09-09 23:53   ` Rob Pike
2014-09-10  4:48 ` Bakul Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140910044814.78442B827@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).