Sandeep K Chaudhary
2014-07-07 22:25:56 UTC
Hi guys,
For the following simple sample program
=================================
#include <avr/io.h>
int main( void )
{
PORTB = 0xFF;
DDRB = 0x1;
}
================================
I get the following ssa form when doing "avr-gcc -mmcu=atmega8 -O3
-fdump-tree-all program.c"
-----------------------------------------------
;; Function main (main, funcdef_no=0, decl_uid=1495, cgraph_uid=0)
main ()
{
volatile uint8_t * _1;
volatile uint8_t * _4;
<bb 2>:
_1 = 56B;
*_1 ={v} 255;
_4 = 55B;
*_4 ={v} 1;
return;
}
--------------------------------------------------
When looking at this ssa tree through a gcc plugin, I wish to be able
to get the register names PORTB and DDRB when dealing with the
statements in basic block 2.
How can I do that? Can I somehow get back to the register names with
the help of 56B and 55B?
Please help me with it.
Thanks and regards,
Sandeep.
For the following simple sample program
=================================
#include <avr/io.h>
int main( void )
{
PORTB = 0xFF;
DDRB = 0x1;
}
================================
I get the following ssa form when doing "avr-gcc -mmcu=atmega8 -O3
-fdump-tree-all program.c"
-----------------------------------------------
;; Function main (main, funcdef_no=0, decl_uid=1495, cgraph_uid=0)
main ()
{
volatile uint8_t * _1;
volatile uint8_t * _4;
<bb 2>:
_1 = 56B;
*_1 ={v} 255;
_4 = 55B;
*_4 ={v} 1;
return;
}
--------------------------------------------------
When looking at this ssa tree through a gcc plugin, I wish to be able
to get the register names PORTB and DDRB when dealing with the
statements in basic block 2.
How can I do that? Can I somehow get back to the register names with
the help of 56B and 55B?
Please help me with it.
Thanks and regards,
Sandeep.