Bernd Schmidt wrote:
So, maybe a simpler strategy could be to make minor modifications to gas and gcc so that the former is linked in and the latter can pass strings to it? Maybe that could get us a performance improvement without the need for a massive overhaul of all backends, and the need to duplicate object code generation.
I don't see that passing strings "internally" would be significantly faster than the current setup, and depending on how it was done, might even end up being slower. And it is well to remember that assembler technology is not trivial. There are environments in which the object formats are quite complex. I think it may well be possible to achieve an improvement of a few per cent in overall performance, but I would guess that the ratio of effort to improvement could be very high. Furthermore, I think you would certainly want to retain the possibility of generating assembler files for two reasons at least: 1) it is very helpful to be able to see the exact asm that is generated, knowing that it really IS the exact asm, and not some possibly incorrect attempt to reconstruct it. 2) when doing a new port for a new target with a new peculiar object format, you really don't want to have to tackle the details of the object format as part of the port.