2013/8/6 Abdul Wahid Memon <engrwahidmemon@xxxxxxxxx>: > Thanks Chung-Ju. But how can I determine the number of operands for > any machine instruction? > > Number of operands do vary for various instructions and there must be > some way to determine this number. > > Regards > > Abdul > According to GCC Internal chapter 10.1: "The expression code determines how many operands the expression contains, and what kinds of objects they are." Also, refer to gcc/rtl.h: "/* The first element of the operands of this rtx. The number of operands and their types are controlled by the `code' field, according to rtl.def. */" The rtx code/patterns are listed in Chatper 10. So I think you need to identify rtx code first then you can determine the number of operands. Best regards, jasonwucj