FB 64bit

General FreeBASIC programming questions.
TbbW
Posts: 348
Joined: Aug 19, 2005 10:08
Contact:

FB 64bit

Post by TbbW »

Any plans on adding 64bit support for FB or is FB just gonna be a 32bit compiler ?
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

That would require a new emitter and I think the plan is to let gcc compile for different architectures once the C emitter is done.
TbbW
Posts: 348
Joined: Aug 19, 2005 10:08
Contact:

Post by TbbW »

So in other words... if you want 64bit support within a year or two your better off using C/C++ ?
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Post by marcov »

TbbW wrote:So in other words... if you want 64bit support within a year or two your better off using C/C++ ?
Like C/C++ are the only languages with a 64-bit compiler!?!?
TbbW
Posts: 348
Joined: Aug 19, 2005 10:08
Contact:

Post by TbbW »

marcov wrote:
TbbW wrote:So in other words... if you want 64bit support within a year or two your better off using C/C++ ?
Like C/C++ are the only languages with a 64-bit compiler!?!?
Well since C was mentioned i used that as an example.
If he would have used Cobol as an example i would have mentioned that.

Seems there is no intrest at all to make FB to run in 64bit or any other arch.
Like QB never made it into 32bit.
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Post by brybry »

Seems there is no intrest at all to make FB to run in 64bit or any other arch.
Actually I have a lot of interest in creating a 64-bit emitter and creating an emitter for ARM processors. I just don't have time.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

TbbW wrote:
marcov wrote:
TbbW wrote:So in other words... if you want 64bit support within a year or two your better off using C/C++ ?
Like C/C++ are the only languages with a 64-bit compiler!?!?
Well since C was mentioned i used that as an example.
If he would have used Cobol as an example i would have mentioned that.

Seems there is no intrest at all to make FB to run in 64bit or any other arch.
Like QB never made it into 32bit.
There are no fb developers actively developing anything at this moment. Or: there are no fb developers. There is counting_pine. He fixes a bug every now and then but he's not a developer (he says so himself).

But not to worry, there are more than enough BASIC(ish) compilers that produce 64bit code.

There is a 64bit QBasic version called qb64
http://www.qb64.net/

GAMBAS (only available on Linux) does 64bit. GAMBAS looks a lot like BASIC (even more so than FreePASCAL). http://gambas.sourceforge.net/en/main.html

BCX is 32bit but since it produces C code from BASIC source code it might be possible to get a C compiler to turn the C code it produces into a 64bit application ( http://www.bcxgurus.com/ ).

There is a 64bit version of FreePASCAL. Pascal looks a bit like BASIC, doesn't it?

You see, lots of choice :)

And those are only the ones I know. There could/should be many more compilers for BASIC(ish) languages out there targeting the 64bit platform.

From the compilers mentioned I'd choose FreePASCAL www.freepascal.org . One of the nice things about FreePASCAL is a project called Lazarus http://www.lazarus.freepascal.org/

Lazarus is a GUI builder you can use to build a FreePASCAL based GUI.

Here's a wild thought: why not target FreePASCAL instead of C? A FreePASCAL backend! PASCAL syntax looks a lot like BASIC syntax, FreePASCAL is as cross platform as needed (Linux/Win), it does 64bit, has decent runtime performance etc... etc.....

Yes, let's forget about ugly C syntax C and join ranks with the FreePASCAL developers.

PASCAL is IN, C is OUT.
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

AGS, I'd rather see an x64 asm emitter over a FreePASCAL emitter or even a C emitter over a FreePASCAL emitter.
jcfuller
Posts: 325
Joined: Sep 03, 2007 18:40

Post by jcfuller »

AGS:
I believe the bcx64 port was abandoned.
GAMBUS is a interpreter isn't it?

PASCAL? Not a choice I, and others, want BASIC.

The only Linux choice I am aware of is BaCon:
http://www.basic-converter.org/

James
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Post by marcov »

1000101 wrote:AGS, I'd rather see an x64 asm emitter over a FreePASCAL emitter or even a C emitter over a FreePASCAL emitter.
I'm a FPC lover, and I (and probably most other FPC devels) rather see a asm emitter than a FPC one.

Why? Because it is more in the FPC spirit.

As far as FPC vs C as backend language for an emitter goes, I think C would be more fitting. (can have thinner runtime library). That is not C vs Pascal though, but GCC vs FPC. FPC is not yet really fit as a system compiler.

But a lot of that depends on the selection of a C compiler on the non-unix targets, most notably windows. One could do worse than FPC there, because many C compilers have problems:

- dependancies, (msvcrt, cygwin)
- licensing (msvc)
- downloadsize (msvc/cygwin/mingw?)
- are generally ackward (some mingw tools still can't deal with spaces in paths)

So first the C proposal should be a bit more detailed.

A fourth choice might be LLVM.
Last edited by marcov on Dec 13, 2010 10:29, edited 1 time in total.
TbbW
Posts: 348
Joined: Aug 19, 2005 10:08
Contact:

Post by TbbW »

Well... if i wanted to use pascall i would not shave or shower for a mounth and just not post about wanting 64bit in FBC on this forum.

brybry: no offence mate but saying u want and dont have time is basicly a waste of time itself ;)

And yes i would like both 64bit and ARM support in FBC since i both use 64bit and ARM arch ( got a ARM9 dev board ).
But it's not like that will be added anytime soon.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

jcfuller wrote:AGS:
I believe the bcx64 port was abandoned.
GAMBUS is a interpreter isn't it?
Yes, of course. GAMBAS is a 64bit interpreter. It does not produce native code (it produces bytecode).
Landeel
Posts: 777
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Post by Landeel »

Here's a wild thought: why not target FreePASCAL instead of C? A FreePASCAL backend! PASCAL syntax looks a lot like BASIC syntax, FreePASCAL is as cross platform as needed (Linux/Win), it does 64bit, has decent runtime performance etc... etc.....
Interesting... Does FreePascal emit C? Would it be too hard to port their C emitter?
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Post by marcov »

Landeel wrote:
Here's a wild thought: why not target FreePASCAL instead of C? A FreePASCAL backend! PASCAL syntax looks a lot like BASIC syntax, FreePASCAL is as cross platform as needed (Linux/Win), it does 64bit, has decent runtime performance etc... etc.....
Interesting... Does FreePascal emit C?
No. It has an own codegenerator for x86,ppc, arm and sparc (and x86_64,ppc64 but not sparc64). The main missing architecture is MIPS.

It has internal assembler for x86/pecoff and /elf, as well as for ARM. x86/mach-O is in development. FPC has an internal linker for the three windows platforms (win32/win64/wince). For the other cases, GNU as and LD are used.

A competing project, GNU Pascal uses the gcc backend (directly, iow without going through C). It is one of the reasons I'm a bit skeptical about such endeavours. The devil is in the details, most notably deployment on Windows.
Would it be too hard to port their C emitter?
I don't think emitters are very portable at all. Even if FPC had one. Their structure is related to the frontend architecture.
Last edited by marcov on Dec 13, 2010 10:30, edited 1 time in total.
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Post by Richard »

I am also interested in a 64 bit version of FB, but I cannot see it happening in the next couple of years without completion first of the C emitter. At present I benefit significantly from the -fpu SSE extensions introduced and debugged by developer brybry.

The emitter language used by FB should have a stable common core that does not change. It should be available for most widely used operating systems in 32 and 64 bit modes. It should support code optimisers and debuggers. The emitter language should also be available for different processors besides the Intel X86 family.

As I see it, the only rational choice of emitter at this time is a member of the C family. So long as C is portrayed as the natural enemy of FB there will be a subliminal hostility to C as the emitter, yet we can have the very best of both languages by using FB syntax with a C or C++ emitter.
Post Reply