|
From: | Paolo Bonzini |
Subject: | Re: Disassembler location |
Date: | Wed, 10 Jul 2024 23:55:30 +0200 |
User-agent: | Mozilla Thunderbird |
On 7/10/24 20:02, Michael Morrell wrote:
I'm working on a port to a new architecture and was noticing a discrepancy in where the disassembler code lives. There is a file "target/<arch>/disas.c" for 4 architectures (avr, loongarch, openrisc, and rx), but a file "disas/<arch>.c" for 14 architectures (if I counted right). It seems the 4 architectures using "target/<arch>/disas.c" are more recently added so I was wondering if that is now the preferred location. I couldn't find information on this, but I wasn't sure where to look.
loongarch puts it in target/<arch>/ because it reuses some code between disassembler and translator.
The others are not hosts, only targets. By putting the file in target/<arch>/, they do not need to add it to the "disassemblers" variable in meson.build---but they add it anyway. :)
All in all, if you're not in the loongarch situation I'd put it in disas/. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |