* * *

Author Topic: Fpc support solaris sparc64 as target?  (Read 1480 times)

IgorM

  • New member
  • *
  • Posts: 5
Fpc support solaris sparc64 as target?
« on: March 22, 2017, 08:22:31 am »
Hi!

When I compiled my program on my Sun T7-2  server, executable file have 32bit ELF format.

Is it possible compile for sparc 64bit?

Fpc support target Solaris Sparc64?
I need call 64bit libraries from my program...

Thank you!

Best Regards
Igor
« Last Edit: March 22, 2017, 08:34:26 am by IgorM »

mig-31

  • Full Member
  • ***
  • Posts: 223
Re: Fpc support solaris sparc64 as target?
« Reply #1 on: March 22, 2017, 10:43:59 am »
Lazarus 1.6 - Linux 32/64 bit, win32

Graeme

  • Hero Member
  • *****
  • Posts: 1413
    • Graeme on the web
Re: Fpc support solaris sparc64 as target?
« Reply #2 on: March 22, 2017, 12:14:20 pm »
Yeah mig-32, but that is for x86 & x64 based CPU's (Intel & AMD), not SPARC.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 556
Re: Fpc support solaris sparc64 as target?
« Reply #3 on: March 22, 2017, 07:04:21 pm »
When I compiled my program on my Sun T7-2  server, executable file have 32bit ELF format.

Is it possible compile for sparc 64bit?

No.

IgorM

  • New member
  • *
  • Posts: 5
Re: Fpc support solaris sparc64 as target?
« Reply #4 on: March 22, 2017, 07:58:35 pm »
Unfortunately!

Is it possible to adopt FPC for SPARC 64 or a lot of work?

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 556
Re: Fpc support solaris sparc64 as target?
« Reply #5 on: March 22, 2017, 07:59:27 pm »
It would be quite a bit of work. How much exactly depends on how different the 32 and 64 bit SPARC variants and their ABIs are.

IgorM

  • New member
  • *
  • Posts: 5
Re: Fpc support solaris sparc64 as target?
« Reply #6 on: March 22, 2017, 08:55:58 pm »
It would be quite a bit of work. How much exactly depends on how different the 32 and 64 bit SPARC variants and their ABIs are.

ABIs for SPARC32 and SPARC64 is NOT big  diffrent: http://docs.oracle.com/cd/E19253-01/816-5138/6mba6ua5r/index.html.
Following is a list of the SPARC V9 ABI features.

    The SPARC V9 ABI allows all 64-bit SPARC instructions and 64-bit wide registers to be used to their full effect. Many of the new relevant instructions are extensions of the existing V8 instruction set. See The SPARC Architecture Manual, Version 9.

    The basic calling convention is the same. The first six arguments of the caller are placed in the out registers %o0-%o5. The SPARC V9 ABI still uses a register window on a larger register file to make calling a function a “cheap” operation. Results are returned in %o0. Because all registers are now treated as 64-bit quantities, 64-bit values can now be passed in a single register, rather than a register pair.

    The layout of the stack is different. Apart from the increase in the basic cell size from 32-bit to 64-bit, various hidden parameter words have been removed. The return address is still %o7 + 8.

    %o6 is still referred to as the stack pointer register %sp, and %i6 is the frame pointer register %fp. However, the %sp and %fp registers are offset by a constant, known as the stack bias, from the actual memory location of the stack. The size of the stack bias is 2047 bytes.

    Instruction sizes are still 32 bits. Address constant generation therefore takes more instructions. The call instruction can no longer be used to branch anywhere in the address space, since it can only reach within plus or minus 2 gigabytes of %pc.

    Integer multiply and divide functions are now implemented completely in hardware.

    Structure passing and return are accomplished differently. Small data structures and some floating point arguments are now passed directly in registers.

    User traps allow certain traps from non-privileged code to be handled by a user trap handler (instead of delivering a signal).

    All data types are now aligned to their size.

    Many basic derived types are larger. Thus many system call interface data structures are now of different sizes.

PascalDragon

  • New member
  • *
  • Posts: 38
  • Compiler Developer
Re: Fpc support solaris sparc64 as target?
« Reply #7 on: June 09, 2017, 09:21:56 pm »
Sparc64 support is currently being worked on by FPK, though it's probably not working yet.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus