64 it compiler

Usage of the framework, compiler and tools

Re: 64 it compiler

Postby X512 » Wed Jul 27, 2016 9:30 pm

It is also possible to add exception table entry dynamically by using RtlAddFunctionTable. Another method is using vectorized exceptions. So exception handling is not a big problem.
X512
 
Posts: 37
Joined: Sat Feb 07, 2015 2:51 pm

Re: 64 it compiler

Postby Robert » Thu Jul 28, 2016 8:52 am

Interesting, but I can't pretend to understand this in any detail.

X512 wrote:I think that most complex task of porting BlackBox to 64 bit is fixing address arithmetic in various modules...


Cuno addressed this point:
We'll have to check whether 64-bit pointers in the BlackBox libraries cause problems. Here we could use the compiler to flag conversions between integers and pointers, in order to find all these places systematically. There shouldn't be too many of them, probably the worst part would be the layout-optimized meta information for module Meta.


He also said:
For the Win64 APIs, new header files exist and the interface modules will have to be adapted (different alignments and the like). That's a real headache, and probably the worst problem of all.
User avatar
Robert
 
Posts: 87
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: 64 it compiler

Postby Ivan Denisov » Sun Aug 14, 2016 8:21 pm

Using of LLVM should be good way for fast reaching of this goal.

This idea was shared few times in OberonCore board: http://forum.oberoncore.ru/viewtopic.ph ... 459#p95459

Also we have no money to invest in the compiler optimization. LLVM can use open-source optimizing compiler.

The problem again with dynamic module loading. If it is possible with LLVM, that would be great luck.
User avatar
Ivan Denisov
 
Posts: 212
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: 64 it compiler

Postby X512 » Fri Aug 26, 2016 1:49 pm

Integration LLVM with BlackBox cound be difficult. Not only code, but meta information should be generated. Compiler should generate valid ocf file for BlackBox dynamic (StdLoader) and static (DevLinler) linker. DLLs, ELFs and LLVM internal format can't be used because they are incompatible with BlackBox runtime and don't provide required meta information that is heavily used by framework.

Since LLVM is written in C++ making BlackBox binding would be difficult. Possible solution may be making native backend for existing Component Pascal compiler that generate LLVM code with meta information in format recognized by LLVM. Then pass that module to DLL written in C++ that use LLVM to generate platform specific code and generate BlackBox native module format (ocf, documented in Dev\Spec\ObjFile.odc).

Ivan Denisov wrote:The problem again with dynamic module loading. If it is possible with LLVM, that would be great luck.

If ocf module will be generated, BlackBox native dynamic loader can be used. Other formats are incompatible with BlackBox runtime, because they don't provide required meta information in required format.
X512
 
Posts: 37
Joined: Sat Feb 07, 2015 2:51 pm

Re: 64 it compiler

Postby Romiras » Sat Feb 04, 2017 5:42 pm

At Reddit user Rusky suggested to look on alternative of LLVM. It called libFirm: http://pp.ipd.kit.edu/firm/.
Rusky wrote:It doesn't have the architecture support of GCC or LLVM, but it's a lot simpler and works pretty well. It has an example C99 frontend and a Brainfuck tutorial as well.

Code generation for x86-64
Romiras
 
Posts: 35
Joined: Tue Sep 17, 2013 5:55 am
Location: Tel-Aviv

Re: 64 it compiler

Postby rko » Sun Feb 05, 2017 5:04 pm

rko
 
Posts: 5
Joined: Tue Jul 12, 2016 4:34 pm

Re: 64 it compiler

Postby Ivan Denisov » Wed Oct 11, 2017 8:03 am



I just found that it has Component Pascal version
https://github.com/congdm/Patchouli-Com ... 0.6/source

It uses GPCP compiler. I think, that it can be ported to BlackBox.
User avatar
Ivan Denisov
 
Posts: 212
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Previous

Return to Common questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron