|
From: | Daniel Diaz |
Subject: | Re: Porting to arm/aarch64 |
Date: | Fri, 12 Jun 2020 14:35:42 +0200 |
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 Daniel.Diaz@univ-paris1.fr). Daniel
|
[Prev in Thread] | Current Thread | [Next in Thread] |