[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Attempt to create an inline assembler for Guile
From: |
Nala Ginrut |
Subject: |
Re: Attempt to create an inline assembler for Guile |
Date: |
Thu, 25 Jun 2015 11:27:25 +0800 |
nice work!
I may take look at it closely.
And I would recommend you use FFI if you just want to get pagesize, it's
easier than writing bunch of C code:
=============================code========================
(use-modules (system foreign))
(define ffi (dynamic-link))
(define sysconf
(pointer->procedure int
(dynamic-func "sysconf" ffi)
(list int)))
(sysconf 30) ; 30 stands for _SC_PAGESIZE
==> 4096
==============================end=======================
Happy hacking!
On Wed, 2015-06-24 at 21:41 +0200, Sjoerd van Leent wrote:
> Hi All,
>
> In line with my will to create an assembler, I started first by being able
> to execute something in memory, using the memory-mapper strategy. I am
> aware not all platforms use the same mechanism, but this is a starting
> point.
>
> At a later point, an inline assembler can be used by a (more abstract) JIT
> engine
>
> I put my repository here:
>
> https://github.com/santidhammo/guile-assembler
>
> Met vriendelijke groet,
> Sjoerd