21 Jul 07:38
Re: What are the functions that i can use?
From: Ian Lance Taylor <iant <at> google.com>
Subject: Re: What are the functions that i can use?
Newsgroups: gmane.comp.gcc.devel
Date: 2008-07-21 05:38:55 GMT
Subject: Re: What are the functions that i can use?
Newsgroups: gmane.comp.gcc.devel
Date: 2008-07-21 05:38:55 GMT
"Mohamed Shafi" <shafitvm <at> gmail.com> writes: > I am involved in porting gcc 4.1.2. > For some processing i need to know whether a register is being defined > and used in a particular instruction. Till now i have been using > 'refers_to_regno_p()' to know whether a register is being used in a > instruction and 'modified_in_p()' to know whether a register is being > defined in the instruction. But 'refers_to_regno_p()' also looks into > expr_list and/or notes in an instruction. So sometimes > refers_to_regno_p() returns 1 when the register is referred in the > expr_list in the instruction even though its use list of the > instruction. > > Could any one tell me the functions that i can use to find out whether > an register is being used and/or defined in a particular instruction? Those functions are fine, but you need to call them on PATTERN (insn), not on insn. Note that call instructions require special handling. Ian
RSS Feed