Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamlopt, and generated ASM
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] ocamlopt, and generated ASM
Nevermind. As always, I find the problem -after- mailing the list ;-)

On 7/27/05, Stephane Glondu <Stephane.Glondu@crans.org> wrote:
> Jonathan Roewen wrote:
> > I'm having some esoteric problems with my operating system project,
> > and it randomly halting (i.e.: the hlt instruction issued with
> > interrupts off). I've tried grepping the ocaml sources, but to no
> > avail.
> >
> > Could someone who has some in-depth knowledge of the code gneretor for
> > ocamlopt explain where these hlt instructions come from, and more
> > importantly, where abouts they are generated?
> 
> Where are these hlt exactly? In the asm file generated from the .ml
> file? In the startup code? In the runtime library? The string "hlt"
> doesn't seem to appear in ocaml (at least in version 3.08.3) source
> code, so it seems very weird (even though possible) that this
> instruction is generated by the compiler... Moreover, you usually need
> to be in privilege level 0 (in kernel mode) to execute that
> instruction, and there are not many ocamlopt-generated programmes run
> in kernel mode... Maybe it is at a place which is not expected to be
> reached in "normal" programme execution (such as after a call to
> exit()). Are you sure this hlt comes from the ocamlopt generated code?
> 
> > Perhaps ocaml 3.08.2 has some interesting bugs I'm not aware of?
> 
> Actually, I'm working with version 3.08.3. But still, I would be
> interested if you found out the problem.
> 
> 
> --
> 
> Stephane Glondu.
>