GCC source code Analysis, Expand_call () function Part III

Source: Internet
Author: User

(Insn_list 6 (nil))

(Insn_list 2 (insn_list 6 (nil)))

(sequence[])

(Reg:si 0)

(Const_int 4)

This is the process of explaining the 5 of these rtx.


Related Code snippet:


/* Mark all register-parms as living through the call. */

Start_sequence ();
for (i = 0; i < num_actuals; i++)
if (Args[i].reg! = 0)
{
if (args[i].partial > 0)
Use_regs (Regno (Args[i].reg), args[i].partial);
else if (Get_mode (args[i].reg) = = Blkmode)
Use_regs (Regno (Args[i].reg),
((Int_size_in_bytes (Tree_type (Args[i].tree_value))
+ units_per_word-1)
/Units_per_word));
Else
EMIT_INSN (Gen_rtx (use, Voidmode, Args[i].reg));
}

if (structure_value_addr &&! structure_value_addr_parm
&& Get_code (struct_value_rtx) = = REG)
EMIT_INSN (Gen_rtx (use, Voidmode, struct_value_rtx));

Use_insns = Gen_sequence ();
End_sequence ();

/* figure out the register where the value, if any, would come back. */
Valreg = 0;
if (Type_mode (Tree_type (exp))! = Voidmode
&&! STRUCTURE_VALUE_ADDR)
{
if (Pcc_struct_value)
Valreg = Hard_libcall_value (Pmode);
Else
Valreg = Hard_function_value (Tree_type (exp), FNDECL);
}

/* Generate the actual call instruction. */
/* This also have the effect of turning off any pop-inhibition
Done in Expand_call. */
if (Args_size.constant < 0)
args_size.constant = 0;
Emit_call_1 (Funexp, Funtype, Args_size.constant,
Function_arg (Args_so_far, Voidmode, Void_type_node, 1),
Valreg, Old_inhibit_defer_pop, Use_insns);


Here is the debug result with fprintf () added

Before Start_sequence

(Insn_list 6 (nil))

(Insn_list 2 (insn_list 6 (nil)))
After Start_sequence
After for if
Before Gen_sequence

(sequence[])
After End_sequence
Before hard

(Reg:si 0)
Hard_funtion_value

(Const_int 4)
Emit_call_1 Funexp Symbol_ref


Describe each of them individually:

(Insn_list 6 (nil))

(Insn_list 2 (insn_list 6 (nil)))


and Start_sequence ();


(sequence[]) and

Use_insns = Gen_sequence ();

About.


(Reg:si 0) and Valreg = Hard_function_value (Tree_type (exp), FNDECL); About.


(Const_int 4) and function Emit_call_1 ()


GCC source code Analysis, Expand_call () function Part III

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.