+ /* Argh, compiling C has some bad consequences:
+ the call type AND the method type might be different.
+ It is implementation defendant what happens in that case.
+ We support inlining, if the bitsize of the types matches AND
+ the same arithmetic is used. */
+ n_params = get_method_n_params(mtp);
+ for (i = n_params - 1; i >= 0; --i) {
+ ir_type *param_tp = get_method_param_type(mtp, i);
+ ir_type *arg_tp = get_method_param_type(ctp, i);
+
+ if (param_tp != arg_tp) {
+ ir_mode *pmode = get_type_mode(param_tp);
+ ir_mode *amode = get_type_mode(arg_tp);
+
+ if (pmode == NULL || amode == NULL)
+ return 0;
+ if (get_mode_size_bits(pmode) != get_mode_size_bits(amode))
+ return 0;
+ if (get_mode_arithmetic(pmode) != get_mode_arithmetic(amode))
+ return 0;
+ /* otherwise we can simply "reinterpret" the bits */
+ }
+ }
+
+ irg = get_irn_irg(call);