10 typedef void iasm_md_extra_info
;
15 enum { unused
} c_language
;
16 const char *constant_string_class_name
= NULL
;
17 int flag_next_runtime
;
21 int disable_typechecking_for_spec_flag
;
23 add_cpp_dir_path (cpp_dir
*p
, int chain
)
29 add_path (char *path
, int chain
, int cxx_aware
, bool user_supplied_p
)
35 builtin_define_with_value (const char *macro
, const char *expansion
, int is_str
)
42 build_function_call (tree function
, tree params
)
44 tree fntype
, fundecl
= 0;
45 tree name
= NULL_TREE
, result
;
46 /* Strip NON_LVALUE_EXPRs, etc., since we aren't using as an lvalue. */
47 STRIP_TYPE_NOPS (function
);
48 /* Convert anything with function type to a pointer-to-function. */
49 gcc_assert(TREE_CODE (function
) == FUNCTION_DECL
);
50 if (TREE_CODE (function
) == FUNCTION_DECL
)
52 name
= DECL_NAME (function
);
54 /* Differs from default_conversion by not setting TREE_ADDRESSABLE
55 (because calling an inline function does not mean the function
56 needs to be separately compiled). */
57 fntype
= build_type_variant (TREE_TYPE (function
),
58 TREE_READONLY (function
),
59 TREE_THIS_VOLATILE (function
));
61 function
= build1 (ADDR_EXPR
, build_pointer_type (fntype
), function
);
64 function
= default_conversion (function
);
65 /* APPLE LOCAL begin mainline */
66 /* For Objective-C, convert any calls via a cast to OBJC_TYPE_REF
67 expressions, like those used for ObjC messenger dispatches. */
68 function
= objc_rewrite_function_call (function
, params
);
70 /* APPLE LOCAL end mainline */
71 fntype
= TREE_TYPE (function
);
73 if (TREE_CODE (fntype
) == ERROR_MARK
)
74 return error_mark_node
;
76 if (!(TREE_CODE (fntype
) == POINTER_TYPE
77 && TREE_CODE (TREE_TYPE (fntype
)) == FUNCTION_TYPE
))
79 error ("called object %qE is not a function", function
);
80 return error_mark_node
;
82 /* fntype now gets the type of function pointed to. */
83 fntype
= TREE_TYPE (fntype
);
85 result
= build3 (CALL_EXPR
, TREE_TYPE (fntype
),
86 function
, params
, NULL_TREE
);
87 TREE_SIDE_EFFECTS (result
) = 1;
89 result
= fold (result
);
94 build_modify_expr (tree lhs
, enum tree_code modifycode
, tree rhs
)
96 gcc_assert(modifycode
== NOP_EXPR
);
97 tree result
= build2(MODIFY_EXPR
, TREE_TYPE(lhs
), lhs
, rhs
);
98 TREE_SIDE_EFFECTS (result
) = 1;
99 // objc write barrier...
104 c_common_type_for_mode (enum machine_mode mode
, int unsignedp
)
110 pointer_int_sum (enum tree_code resultcode
, tree ptrop
, tree intop
)
116 decl_constant_value (tree decl
)
122 lookup_name_two (tree name
, int ARG_UNUSED (prefer_type
))
139 static enum machine_mode
140 iasm_get_mode (tree type
)
146 iasm_ptr_conv (tree type
, tree exp
)
152 iasm_build_bracket (tree v1
, tree v2
)
158 iasm_default_function_conversion (tree exp
)
164 iasm_is_pseudo (const char *opcode
)
170 iasm_op_comp (const void *a
, const void *b
)
176 iasm_constraint_for (const char *opcode
, unsigned argnum
, unsigned ARG_UNUSED (num_args
))
182 iasm_process_arg (const char *opcodename
, int op_num
,
183 tree
*outputsp
, tree
*inputsp
, tree
*uses
, unsigned num_args
,
184 iasm_md_extra_info
*e
)
190 iasm_identifier (tree expr
)
196 iasm_is_prefix (tree
ARG_UNUSED (id
))
202 iasm_num_constraints_1 (tree io
)
208 iasm_num_constraints (tree inputs
, tree outputs
)
214 iasm_set_constraints_1 (int num
, tree io
)
220 iasm_set_constraints (int num
, tree inputs
, tree outputs
)
226 iasm_op_clobber_comp (const void *a
, const void *b
)
232 iasm_extra_clobbers (const char *opcode
, tree
*clobbersp
)
238 iasm_stmt (tree expr
, tree args
, int lineno
)
244 iasm_field_offset (tree arg
)
250 iasm_simple_expr (tree arg
)
256 iasm_expr_val (tree arg
)
262 iasm_force_constraint (const char *c
, iasm_md_extra_info
*e
)
268 iasm_maybe_force_mem (tree arg
, char *buf
, unsigned argnum
, bool must_be_reg
, iasm_md_extra_info
*e
)
274 iasm_print_operand (char *buf
, tree arg
, unsigned argnum
,
276 bool must_be_reg
, bool must_not_be_reg
, iasm_md_extra_info
*e
)
282 iasm_get_register_var (tree var
, const char *modifier
, char *buf
, unsigned argnum
,
283 bool must_be_reg
, iasm_md_extra_info
*e
)
289 iasm_reg_name (tree id
)
295 iasm_label (tree labid
, int atsign
)
301 iasm_get_identifier (tree id
, const char *str
)
307 iasm_clear_labels (void)
319 iasm_get_label (tree labid
)
325 iasm_build_register_offset (tree offset
, tree regname
)
331 iasm_entry (tree keyword
, tree scspec
, tree fn
)