Re: Porting to arm/aarch64
Daniel Diaz <[email protected]> Fri, 12 Jun 2020 14:35:42 +0200
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Jasper, Sorry for the late reply, You can have a look at the PORTING file which gives some information about adding a new architecture. The main task is to write a mapper from MiniAssembly to Asm. See example files in src/Ma2Asm which contains mapper MA->ASM for various architectures. The mappers are written in C (it is a good idea to use another mapper as basis) .Maybe look at the file mips_irix.c file. I generally look at the asm generated by gcc (using various optimization flags in order to understand the asm generated, -O0 to -O3). For this you can look at src/Ma2Asm/FromC. Do a make (modify Makefile to test with various CFLAGS). It compiles asm_inst.c to asm ; the study of asm_inst.s gives you hints about the translation of MA instructions. Maybe you need to adapt the asm_inst.c file. Basically it contains C functions whose translation to asm helps you to write the mapper (the name of C functions are useful to know what Ma instruction it corresponds). Don’t hesitate to write me directly if you need more help (by mail to [email protected] <mailto:[email protected]>). Daniel > Le 30 mai 2020 à 16:39, Jasper Taylor <[email protected]> a écrit : > > Hi all, > > I am thinking about trying to port GNU prolog to the ARM architecture (linux os). Before I get started, has anyone already had a go at this, if so, how far did you get and what problems did you encounter? > > Thanks for reading > > --Jasper > > >