public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GNU Assembler Start of Function & basic block
       [not found]   ` <00ff01c84c3c$f4d975a0$33160e98@ece.ncsu.edu>
@ 2008-01-01  6:20     ` Ramana Radhakrishnan
  0 siblings, 0 replies; only message in thread
From: Ramana Radhakrishnan @ 2008-01-01  6:20 UTC (permalink / raw)
  To: Balaji V. Iyer; +Cc: gcc

Hi Balaji,

Its probably better to continue this conversation on gcc@ - so moving
it over there.

On Jan 1, 2008 11:40 AM, Balaji V. Iyer <bviyer@ncsu.edu> wrote:
> Dear Ramana,
>        Thank you very much for your response. 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.

>        Now, can these specialized instructions be conveyed in the
> machien description of GCC? I have looked through the MD documentation
> in the internals document and I hvae not found a way to do so.

You can have specialized instructions which are inside unspec's and
generate them out of your pass. unspec / unspec_volatile is a nice way
to hide any special stuff you want to maintain as a part of your port.

>        I have noticed that in the assembly passed into the assembler
> from GCC, every basic block start is starting with a label. Does it do
> anything special (like set a variable or something like that) to
> indicate that it has seen a label? Also, any machine dependent function
> that can I call during this phase? Also, does it do something like this
> in the beginning of a function (since it is sort of a basic block start
> in itself)

I don't know of any machine dependent function for this purpose ,
you'll have to add it yourself . Typically instrumentation that
happens with fprofile-arcs and gcov is edge based coverage and not
node based coverage.


>
> Thank you very much in advance for all your help...

HTH,

cheers
Ramana
>
> Yours Sincerely,
>
> Balaji V. Iyer.
>
> --
>
> Balaji V. Iyer
> PhD Student,
> Center for Efficient, Scalable and Reliable Computing,
> Department of Electrical and Computer Engineering,
> North Carolina State University.
>
>
>
> -----Original Message-----
> From: Ramana Radhakrishnan [mailto:ramana.r@gmail.com]
> Sent: Tuesday, January 01, 2008 12:47 AM
> To: Balaji V. Iyer
> Cc: binutils@sourceware.org
> Subject: Re: GNU Assembler Start of Function & basic block
>
> Hi,
>
>
> On Jan 1, 2008 3:35 AM, Balaji V. Iyer <bviyer@ncsu.edu> wrote:
> > Hello Everyone,
> >        I have a question regarding GNU Assembler.
> >
> > I am currently working with the OpenRISC port of GNU Binutils
> > (2.11.92) and I am making some modifications to the ISA. I want to
> > insert special instructions at the beginning and end of each basic
> > block AND another set of special instructions at the beginning and end
>
> > of function (I tried to do it in GCC and I was unsuccessful in
> > representing these instructions in the machine description).
>
> I don't think the assembler can help you figure out the basic blocks by
> default. You would have to write code to detect basic blocks and then
> add these instructions.  I'd suggest you use GCC for such
> instrumentation.
>
> For functions its easy - you have to modify your expand_{pro/epi}logue
> functions for doing this if you have RTL based prologue and epilogues
> based on command line switches.
>
> For basic blocks you might choose to look at the coverage options to
> figure this out (fprofile-arcs and their friends).Or you could write a
> pass that was in cfglayout mode to insert these special instructions.
> Anyways this discussion is more relevant to the GCC list , so you could
> continue it there.
>
> HTH,
>
> cheers
> Ramana
>
> >
> > I looked through the GNU Assembler Internals manual and I couldn't
> > find any specialized functions that can be used to access the start
> > and end of each basic block OR function-call (I may have missed
> something...).
> > Can someone please point me in the right direction?
> >
> > Any help is greatly appreciated!
> >
> > Thanks in advance,
> >
> > Yours Sincerely,
> >
> > Balaji V. Iyer.
> >
> > --
> >
> > Balaji V. Iyer
> > PhD Student,
> > Center for Efficient, Scalable and Reliable Computing, Department of
> > Electrical and Computer Engineering, North Carolina State University.
> >
> >
>
>
>
> --
> Ramana Radhakrishnan
>
>



-- 
Ramana Radhakrishnan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-01  6:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <00fb01c84bf9$51bd9ce0$33160e98@ece.ncsu.edu>
     [not found] ` <67ea2eb0712312147y134e76evb0d150da30b51417@mail.gmail.com>
     [not found]   ` <00ff01c84c3c$f4d975a0$33160e98@ece.ncsu.edu>
2008-01-01  6:20     ` GNU Assembler Start of Function & basic block Ramana Radhakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).