From: "Alexander Bottema" <Alexander.Bottema@mathworks.com>
To: <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] [patch] PIC on amd64
Date: Wed, 25 Jan 2006 08:26:32 -0500 [thread overview]
Message-ID: <DB873318D1A41648BEAC4B5AAB63B3E10C556AD3@MESSAGE-AH.ad.mathworks.com> (raw)
Hasn't support for PIC/AMD64 been fixed in the latest release of OCaml
(3.09.1)? Or have you found a bug in 3.09.1? I've tried to (native)
compile a simple program on AMD64 as a shared library and it worked
fine.
Alexander Bottema
(Software Developer @ The Mathworks)
-----Original Message-----
From: caml-list-bounces@yquem.inria.fr
[mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Erik Bourget
Sent: Wednesday, January 25, 2006 7:52 AM
To: caml-list@yquem.inria.fr
Subject: [Caml-list] [patch] PIC on amd64
Attached is a patch that makes ocaml able to compile proper PIC code on
amd64.
This allows shared libraries to be created from ocaml code.
This patch needs work - in addition to being rough around the edges,
there is
a fairly major issue where it will generate patters as such:
some_label:
movq camlPcre@GOTPCREL(%rip), %r13
movq 248(%r13), %r10
call caml_apply8@PLT
...
caml_apply8:
call (%r10) # should call camlPcre+248
This would be cool but %r10 is clobbered by the call in some
circumstances as
it's defined as a scratch register. Ocaml's compiler seems to have
logic to
'spill' registers onto the stack but I haven't studied it hard enough to
put
it to use; maybe someone else is more familiar and will be able to mark
registers as live when they are used in this way? :)
- Erik
next reply other threads:[~2006-01-25 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-25 13:26 Alexander Bottema [this message]
2006-01-25 19:53 ` Erik Bourget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB873318D1A41648BEAC4B5AAB63B3E10C556AD3@MESSAGE-AH.ad.mathworks.com \
--to=alexander.bottema@mathworks.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox