Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Ocamlopt code generator question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Marc Eber <jeanmarc.eber@l...>
Subject: Re: [Caml-list] Ocamlopt code generator question
Hi Dimitry,

LexiFi for instance _is_ clearly interested by a sse2 32bit code generator.

One should probably have the following in mind and/or ask the following questions:

- it is probably not a good idea to support both backends (sse2 and old stack fp 
i386 architecture). It will be necessary to make a choice (especially taking in 
account the limited INRIA resources and the burden of already supporting 
different windows ports).

- would INRIA be ok to switch to a sse2 code generator (based on Dimitry's patch 
- supposing that he is ok to donate it to INRIA - or Xavier's work or whatever)?

- I also guess that a sse2 code generator would be simpler than the current one 
(that has to support this horrible fp stack architecture) and would therefore be 
a better candidate for further enhancements.

- what is the opinion on this list, as a switch to a sse2 backend would exclude 
"old" processors from being OCaml compatible (I don't have a precise list at 
hand for now) ?

My opinion is that this support of legacy hardware is not important, but I guess 
others are arguing in opposite directions... :-)

But again, having better floating point performance (and predictable behaviour, 
compared to the bytecode version) would be a big plus for some applications.

Best regards,


Dmitry Bely a écrit :
> I see. Why I asked this: trying to improve floating-point performance
> on 32-bit x86 platform I have merged floating-point SSE2 code
> generator from amd64 ocamlopt back end to i386 one, making ia32sse2
> architecture. It also inlines sqrt() via -ffast-math flag and slightly
> optimizes emit_float_test (usually eliminates an extra jump) -
> features that are missed in the original amd64 code generator. All
> this seems to work OK: beyond my own code all tests found in Ocaml CVS
> test directory are passed. Of course this is idea is not new - you had
> working IA32+SSE2 back end several years ago [1] but unfortunately
> never released it to the public.
> Is this of any interest to anybody?
> - Dmitry Bely
> [1]
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: