Lines Matching refs:ctype

32 	return symbol_type(sym->ctype.base_type);  in func_return_type()
44 struct symbol *arg_sym = arg->ctype.base_type; in sym_func_type()
57 base_type = sym->ctype.base_type; in sym_array_type()
119 if (is_void_type(sym->ctype.base_type)) in sym_ptr_type()
122 type = symbol_type(sym->ctype.base_type); in sym_ptr_type()
181 return symbol_type(sym->ctype.base_type); in symbol_type()
192 ret = symbol_type(sym->ctype.base_type); in symbol_type()
242 if (sym->ctype.modifiers & MOD_STATIC) in data_linkage()
250 if (sym->ctype.modifiers & MOD_STATIC) in function_linkage()
355 static LLVMValueRef val_to_value(unsigned long long val, struct symbol *ctype) in val_to_value() argument
360 assert(ctype); in val_to_value()
361 dtype = symbol_type(ctype); in val_to_value()
365 sparse_error(ctype->pos, "no value possible for %s", show_typename(ctype)); in val_to_value()
366 return LLVMGetUndef(symbol_type(ctype)); in val_to_value()
369 static LLVMValueRef pseudo_to_value(struct function *fn, struct symbol *ctype, pseudo_t pseudo) in pseudo_to_value() argument
381 result = val_to_value(pseudo->value, ctype); in pseudo_to_value()
394 result = LLVMGetUndef(symbol_type(ctype)); in pseudo_to_value()
403 static LLVMValueRef pseudo_to_rvalue(struct function *fn, struct symbol *ctype, pseudo_t pseudo) in pseudo_to_rvalue() argument
405 LLVMValueRef val = pseudo_to_value(fn, ctype, pseudo); in pseudo_to_rvalue()
406 LLVMTypeRef dtype = symbol_type(ctype); in pseudo_to_rvalue()
413 static LLVMValueRef value_to_ivalue(struct function *fn, struct symbol *ctype, LLVMValueRef val) in value_to_ivalue() argument
416 LLVMTypeRef dtype = symbol_type(ctype); in value_to_ivalue()
422 if (ctype && is_int_type(ctype)) { in value_to_ivalue()
428 static LLVMValueRef value_to_pvalue(struct function *fn, struct symbol *ctype, LLVMValueRef val) in value_to_pvalue() argument
431 LLVMTypeRef dtype = symbol_type(ctype); in value_to_pvalue()
433 assert(is_ptr_type(ctype)); in value_to_pvalue()
447 static LLVMValueRef adjust_type(struct function *fn, struct symbol *ctype, LLVMValueRef val) in adjust_type() argument
449 if (is_int_type(ctype)) in adjust_type()
450 return value_to_ivalue(fn, ctype, val); in adjust_type()
451 if (is_ptr_type(ctype)) in adjust_type()
452 return value_to_pvalue(fn, ctype, val); in adjust_type()
460 static LLVMValueRef get_operand(struct function *fn, struct symbol *ctype, pseudo_t pseudo) in get_operand() argument
462 LLVMValueRef target = pseudo_to_value(fn, ctype, pseudo); in get_operand()
463 return adjust_type(fn, ctype, target); in get_operand()
471 static LLVMValueRef get_ioperand(struct function *fn, struct symbol *ctype, pseudo_t pseudo) in get_ioperand() argument
473 LLVMValueRef target = pseudo_to_value(fn, ctype, pseudo); in get_ioperand()
474 return value_to_ivalue(fn, ctype, target); in get_ioperand()
800 struct symbol *ctype; in output_op_call() local
809 PREPARE_PTR_LIST(insn->fntypes, ctype); in output_op_call()
811 func = get_operand(fn, ctype, insn->func); in output_op_call()
813 func = pseudo_to_value(fn, ctype, insn->func); in output_op_call()
816 NEXT_PTR_LIST(ctype); in output_op_call()
817 args[i++] = pseudo_to_rvalue(fn, ctype, arg); in output_op_call()
819 FINISH_PTR_LIST(ctype); in output_op_call()
1136 struct symbol *base_type = sym->ctype.base_type; in output_fn()
1247 if (sym->ctype.modifiers & MOD_CONST) in output_data()
1249 if (sym->ctype.modifiers & MOD_TLS) in output_data()
1251 if (sym->ctype.alignment) in output_data()
1252 LLVMSetAlignment(data, sym->ctype.alignment); in output_data()
1254 if (!(sym->ctype.modifiers & MOD_EXTERN)) in output_data()
1263 sym = sym->ctype.base_type; in is_prototype()