What assembler will be targeted?

I am creating a toy compiler as a training project, and now I am in the phase of code generation. I found this page describing a lot of different assemblers that I could aim at, and I would like to get some recommendations for selection.

My goal is to optimize my learning experience - for this purpose I tried to make decisions that will give me the most useful knowledge in the future. Here are some examples:

  • using many intermediate steps, not directly from AST to ASM
  • targeting x64 / Linux, not JVM or LLVM

I understand that this is quite subjective, so try to clarify further: I prefer open-source property, widely used in order not to be widely used, from broad to specific. To this end, I would avoid something like HLA, as it is more "specific" than a true ASM.

If this sounds particularly uninformed, I am still participating, so feel free to let me know if I am "doing it wrong."

+3
source share
2 answers

, x86, RISC ( ), MIPS, MIPS ?

, Linux NASM . , YASM, FASM Intel, GNU-, AT & T, , gcc.

+2

ASM, - , , , - . , , .

, , , , ASM , , , (IIRC printf , ). , , , , .

0

Source: https://habr.com/ru/post/1735497/


All Articles