This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: GNU Assembler Start of Function & basic block
Hi Balaji,
I am doing it through
assembler because I want to put specalized control instructions that I
have created to explain the register usage to the processor. These
instructions give information about register usage and liveness
information to the processor.
This is definitely something that can only be done in the compiler, not the
assembler.
Now, can these specialized instructions be conveyed in the
machine description of GCC? I have looked through the MD documentation
in the internals document and I hvae not found a way to do so.
Yes. Ask on the gcc mailing lists about this. Also have a look at how UNSPEC
patterns are used for various architectures. Plus you may not need to put this
into the machine description. You may be able to include the code to generate
the instructions in the backend's function prologue and epilogue generating
code. You may also be able to use some of the compiler's support for the GCOV
tool in order to add per-basic-block instructions.
Cheers
Nick