Message ID | 20211027220709.750104-1-shorne@gmail.com |
---|---|
State | New |
Headers | show |
Series | or1k: Add return address argument to _mcount call | expand |
diff --git a/gcc/config/or1k/or1k.h b/gcc/config/or1k/or1k.h index fe01ab81ead..4603cb67160 100644 --- a/gcc/config/or1k/or1k.h +++ b/gcc/config/or1k/or1k.h @@ -387,9 +387,10 @@ do { \ profiling a function entry. */ #define PROFILE_HOOK(LABEL) \ { \ - rtx fun; \ + rtx fun, ra; \ + ra = get_hard_reg_initial_val (Pmode, LR_REGNUM); \ fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, ra, Pmode); \ } /* All the work is done in PROFILE_HOOK, but this is still required. */