[haiku-bugs] Re: [Haiku] #1141: Support for x86-64 architecture

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Tue, 04 May 2010 21:30:18 -0000

#1141: Support for x86-64 architecture
---------------------------+------------------------------------------------
 Reporter:  ekdahl         |       Owner:  bonefish   
     Type:  enhancement    |      Status:  assigned   
 Priority:  normal         |   Milestone:  Unscheduled
Component:  System/Kernel  |     Version:             
 Keywords:                 |   Blockedby:             
 Platform:  x86-64         |    Blocking:             
---------------------------+------------------------------------------------

Comment(by bonefish):

 Replying to [comment:12 nmentley]:
 > Thanks, I've noticed that the fenv.h files in /headers/ponix/arch/ are
 from freebsd.
 > The x86_64 one i've included is also from freebsd. I've left the
 original header of the file intact... Is there anything else I should do
 when including code from other projects?

 When larger components are included we use a vendor branch, but individual
 files we just add. The exact version/revision of the file should be given
 in commit message, though, so future updates will be simpler (in case we
 make changes).

 Some more comments on the patches:
  - binutils/gas/configure.tgt:
    - Only changes whitespace. Please remove.
  - binutils/bfd/config.bfd:
    - I don't think we need the i386coff_vec in targ_selvecs. Haiku doesn't
 support COFF.
  - gcc/gcc/config/i386/haiku64.h:
    - typo in TODO: reoved -> removed
    - I don't understand the comment "If ELF is the default format, we
 should not use /lib/elf". You probably copied it from somewhere, but Haiku
 doesn't have a /lib/elf, actually not even a /lib.
  - build/jam/BuildSetup:
    - bios_x86-64 -> bios_x86_64. That's the name of the boot platform
 directory in src/system/boot/platform. By convention we use underscores
 only.
    - The TODO in the last x86_64 case is superfluous. We don't need
 -march, since we want to support all x86_64 platforms. You could add
 {{{HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS}}}, though. The atomic
 built-ins should be available for gcc4. They just aren't enabled for the
 platforms != x86 yet, because they have not been tested there. In fact I
 would even try and implement the atomic_*() functions for x86_64 using the
 built-ins. Saves you some meddling with assembly code.
  - headers/posix/arch/x86_64/arch_setjmp.h:
    - This one looks unfinished (12 ints probably won't suffice). That's OK
 for starters, but please add a TODO at least. Note that setjmp()/longjmp()
 are used in the kernel debugger, so you'll need to implement them
 relatively early.

 Other than that the patches look OK. Please address the comments, then
 I'll commit them.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/1141#comment:13>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: