This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] convert some call ABI macros to hooks, apply to sh, add bitfield swapper


> Because optimize_mode_switching needs to know whether a call pattern
> preserves or clobbers the size bits in fpscr.  Renesas clobbers them,
> GCC preserves them.  The only time we have information on the type of
> the function being called is when initializing the cumulative
> arguments data structure.  When all we have is a call pattern,
> we can't tell, especially for indirect calls.

Is it sufficient to just do this?

(call_insn 12 11 13 (parallel [
            (call (mem:SI (reg:SI 161) [0 S4 A32])
                (const_int 1 [0x1]))
            (use (reg:PSI 151 fpscr))
            (clobber (reg:SI 146 pr))
        ]) -1 (nil)
    (nil)
    (expr_list (use (reg:SI 4 r4))
        (nil)))

(note the 1 instead of 0 for renesas calls).  The other call cookie
only happens for sh5 anyway, renesas calls only happen for !sh5.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]