[Firm] Evaluation of Firm

David SAUVAGE - AdaLabs Ltd david.sauvage at adalabs.com
Fri Aug 31 11:55:41 CEST 2018


On 08/31/2018 10:41 AM, David SAUVAGE - AdaLabs Ltd wrote:
> Hello,
>
> I'm currently having a closer look into Firm, congrats for this great
> project.
>
> Going from the "Front End tutorial" on the "Simple" language, I have
> been able to generate the IR and view the generated VCG using yComp.
> Taking from the end of the tutorial, I would like to generate an x86_64
> executable. I might dig into the cparser to look around,
>
> any tips is most welcome ;-)
>
> Cheers
>
Oops, I went a bit too quick, standard output is the backend assembly code

Attached my Makefile for the tutorial. It's folder is at the same level
of the git libfirm folder

Cheers

-------------- next part --------------

build:
	gcc tutorial.c -I../libfirm/build/gen/include/libfirm/ -L../libfirm/build/debug/ -l:libfirm.a -lm -o tutorial

example: build
	./tutorial example.simple > example.s
	gcc -c example.s -o example.o
	gcc -c libruntime.c
	gcc example.o libruntime.o -o example

clean:
	rm -rf example example.o __simple_main-00.vcg example.s libruntime.o plus-00.vcg tutorial


More information about the Firm mailing list