I'm working on a project and proposing some extensions for the x86-64 ISA. The topical part is that I'm not following the x86 convention at all. There is a prefix that we're reserving and then it's the wild west after
So far I've been placing statements in my C file like this
asm(".byte 0xF1, 0B0001");
This is tedious, error-prone and the biggest disadvantage is that I can't use GCC's asm constraints. The last feature would let me specify variables in lieu of registers.
I'm curious, how difficult would it be to extend fasm to introduce my insructions? Are there some documents to help get started? What would the developers suggest? I had looked at GAS before but it's so rigid and complicated that it would not be worth the effort for such a small project.
Also, will there be problems if I compile the top-level C file with GCC, the assembly with FASM and then link it all with GNU LD?
Thanks so much
EDIT: I should clarify that the extensions are being designed for an x86-64 hardware simulator.
Joined: 16 Jun 2003
Location: Kraków, Poland
There is a small tutorial on adding custom instruction handlers to fasm: http://board.flatassembler.net/topic.php?t=208
It is from 2003, so you may find that some things were changed/extended in the meantime, but the basic principles are still the same.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum