Hello, > I am currently working on OpenRISC port of GCC-4.0.2, and I have to > insert a custom RTL (which gets translated to an instruction) at fixed > parts of the code. I have created the custom instruction (by modifying > RTL.DEF) and then put the appropritae constraints in my .md file. > > Now, I want this instructoin to be inserted at specific points...How > can I do it? What function shiould I call to output this RTL?
You can use the following function to emit the new RTL instruction you created: emit_insn (gen_rtx_NEW_OP ...) To insert the instruction in specific point (in this example; before insn) you can use the following sequence: start_sequence (); emit_insn (gen_rtx_NEW_OP ...) seq = get_insns (); end_sequence (); emit_insn_before (seq, insn);) HTH, Revital > > Any help is highly appreciated! > > Please CC me in the answer since I am not a subscribed member of GCC. > > Regards, > > Balaji V. Iyer. > > -- > > Balaji V. Iyer > PhD Candidate, > Center for Efficient, Scalable and Reliable Computing, > Department of Electrical and Computer Engineering, > North Carolina State University. > >