From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B11457EE25 for ; Fri, 8 Nov 2013 12:35:48 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=pra; client-ip=212.159.14.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=mailfrom; client-ip=212.159.14.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@avasout08.plus.net) identity=helo; client-ip=212.159.14.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="postmaster@avasout08.plus.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8CAMDLfFLUnw4UnGdsb2JhbABagkN8tySJbhYOAQEBAQEGDQkJFCiCLAgCIygxBQ0DWCMcAQQeBYd1CZs8oVWUHgOPHIUShRCUAg X-IPAS-Result: Ap8CAMDLfFLUnw4UnGdsb2JhbABagkN8tySJbhYOAQEBAQEGDQkJFCiCLAgCIygxBQ0DWCMcAQQeBYd1CZs8oVWUHgOPHIUShRCUAg X-IronPort-AV: E=Sophos;i="4.93,659,1378850400"; d="scan'208,217";a="41714667" Received: from avasout08.plus.net ([212.159.14.20]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Nov 2013 12:35:48 +0100 Received: from XPS ([87.113.147.175]) by avasout08 with smtp id mzbm1m0053nHPDT01zbnVt; Fri, 08 Nov 2013 11:35:47 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=OdqhUHjY c=1 sm=1 tr=0 a=TICNVJQxr52ePB7IOjMYhw==:117 a=TICNVJQxr52ePB7IOjMYhw==:17 a=0Bzu9jTXAAAA:8 a=Xub9RBUEA-sA:10 a=Kvk-SOs2Z7YA:10 a=r2vSxAw-AAAA:8 a=vnUrwXtd0dgA:10 a=DAwyPP_o2Byb1YXLmDAA:9 a=Zr7miEi8wWIA:10 a=cKsnjEOsciEA:10 a=VrBaaCcmAAAA:8 a=nm2HxRzrAAAA:8 a=FIfpvySycDh9SF3e5KUA:9 a=CjuIK1q_8ugA:10 a=6Bp66XNJloIA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=UifHgmSGSkYLcNA-lWQA:9 a=HCnQFxMv2P4iPQx9:21 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 X-AUTH: jdh302:2500 Reply-To: From: "Jon Harrop" To: "Caml List" Date: Fri, 8 Nov 2013 11:35:47 -0000 Organization: Flying Frog Consultancy Ltd. Message-ID: <012201cedc76$ac280a80$04781f80$@ffconsultancy.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0123_01CEDC76.AC287FB0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac7cdkGv/5qXDMU9Rx6A9m6pDlu5oQ== Content-Language: en-gb Subject: [Caml-list] Generating x86 code This is a multipart message in MIME format. ------=_NextPart_000_0123_01CEDC76.AC287FB0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I've been looking at generating x86 code and found some interesting links. Here is a declarative description of the instruction set and its encoding in XML: http://ref.x86asm.net/ LuaJIT has a really nice C macro library called DynAsm.h that lets you write x86 assembler in your C code in order to generate it: http://luajit.org/dynasm_examples.html Is there anything like this for OCaml? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com ------=_NextPart_000_0123_01CEDC76.AC287FB0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

I’ve been looking at generating x86 code an= d found some interesting links. Here is a declarative description of the in= struction set and its encoding in XML:

<= o:p> 

http://ref.x86asm.net/

 <= /o:p>

LuaJIT has a really nice C macro library call= ed DynAsm.h that lets you write x86 assembler in your C code in order to ge= nerate it:

 

http://luaj= it.org/dynasm_examples.html

&nb= sp;

Is there anything like this for OCaml?

 

= --

Dr Jon Harrop, Flying Frog Consultan= cy Ltd.

http://www.ffconsultancy.com

= ------=_NextPart_000_0123_01CEDC76.AC287FB0--