Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #107 (closed enhancement: fixed)

Opened 2 months ago

Last modified 2 months ago

x86-64 patch

Reported by: wilsonk Assigned to:
Priority: major Milestone: Beta
Component: Version:
Keywords: x86-64 Cc:

Description

Here is the patch to get x86-64 support working (all minitests compile/run except vararg1).

Thanks, K.Wilson

Attachments

x86-64.patch (36.2 kB) - added by wilsonk on 10/27/08 13:48:04.
x86-64-asm.patch (18.1 kB) - added by ChristianK on 10/30/08 06:13:11.
x86-64-review.patch (2.1 kB) - added by ChristianK on 10/30/08 06:13:28.

Change History

10/27/08 13:48:04 changed by wilsonk

  • attachment x86-64.patch added.

10/28/08 11:11:56 changed by lindquist

the correct size of real on x86-64 with LLVM is 16 bytes, that is, REALSIZE=16 and REALPAD=6

10/28/08 13:03:53 changed by lindquist

  • milestone set to Beta.

10/28/08 14:19:10 changed by lindquist

Would it be feasible to convert to the x86-64 chanages in d-asm-i386.h to be runtime configurable somehow ? Otherwise we should make a copy of int d-asm-x86-64.h and have a parser for each target instead.

10/30/08 06:12:31 changed by ChristianK

I have applied a part of wilsonk's patch. x86-64-asm.patch, x86-64-review.patch are the remaining diffs. Also the correct REALSIZE and REALPAD needs to be set in mtype.c:245. Was it 16 and 6? (and I think the code that zeros the padding always assumes pad = 2...)

10/30/08 06:13:11 changed by ChristianK

  • attachment x86-64-asm.patch added.

10/30/08 06:13:28 changed by ChristianK

  • attachment x86-64-review.patch added.

11/02/08 14:33:55 changed by wilsonk

Hey ChristianK,

The REALSIZE is 16 and 6. This modification works fine on my machine, by the way.

Thanks, K.Wilson

11/04/08 09:38:39 changed by lindquist

It seems hard to me to generalize the stuff in d-asm-i386.h to a point where we can control which platform to allow code for, and reject 64bit code when compiling for 32bit. I don't think it would be that bad to simply duplicate the necessary code. I doubt there will be more new x86 architectures in the future ...

11/04/08 09:41:38 changed by lindquist

Alternatively we should drop our cross compiling goal, or at least make it only compile-time configurable, then users will have a build of LDC for each platform they need to support. This is an easier solution and maybe not that bad really? Having full runtime configurability is cool, but hard to get right, and in this case it's an obstacle ...

11/04/08 11:55:31 changed by ChristianK

I think having both asm parsers side by side is possible and may not even be hard to do. I'll look into it.

11/08/08 16:30:24 changed by ChristianK

  • status changed from new to closed.
  • resolution set to fixed.

Merged in [756]. I think that's it for this ticket. Thanks again wilsonk!

Copyright © 2008, LDC Development Team.