From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1E1B8D179 for ; Wed, 27 Jul 2005 03:28:28 +0200 (CEST) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6R1SRsJ011062 for ; Wed, 27 Jul 2005 03:28:27 +0200 Received: by rproxy.gmail.com with SMTP id a36so101863rnf for ; Tue, 26 Jul 2005 18:28:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LazrtWBjmuWZ/I1dk5UilRUWs5a0NK+kJTrAtcAEul447mAfU8fbufHZ0mewrvN9JuVRCQb3eV1LaxlP514VYCeTx905T0PxBnu7UEu4VYPdSChVLHSPzlk0PFHqwfYV+Y3VKGCHAIe1MGyoQmUNWJ9zWbKxSsrj7XbmH8o90PI= Received: by 10.38.78.7 with SMTP id a7mr221479rnb; Tue, 26 Jul 2005 18:28:27 -0700 (PDT) Received: by 10.38.209.44 with HTTP; Tue, 26 Jul 2005 18:28:27 -0700 (PDT) Message-ID: Date: Wed, 27 Jul 2005 13:28:27 +1200 From: Jonathan Roewen Reply-To: Jonathan Roewen To: Stephane Glondu Subject: Re: [Caml-list] ocamlopt, and generated ASM Cc: caml-list@yquem.inria.fr In-Reply-To: <42E6DC6E.60109@crans.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42E6DC6E.60109@crans.org> X-Miltered: at nez-perce with ID 42E6E33B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlopt:01 grepping:01 ocaml:01 ocamlopt:01 runtime:01 ocaml:01 compiler:01 hlt:98 interrupts:98 hlt:98 ...:98 ...:98 wrote:01 wrote:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Nevermind. As always, I find the problem -after- mailing the list ;-) On 7/27/05, Stephane Glondu 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? >=20 > 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? >=20 > > Perhaps ocaml 3.08.2 has some interesting bugs I'm not aware of? >=20 > Actually, I'm working with version 3.08.3. But still, I would be > interested if you found out the problem. >=20 >=20 > -- >=20 > Stephane Glondu. >