This is the mail archive of the gcc@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: Doubt about filling delay slot


"Mohamed Shafi" <shafitvm@gmail.com> writes:

> Say the target has two delay slots for call instructions.
> So we can have something like this
> (define_attr "slottable" "no,yes,has_slot" (const_string "yes"))
>
> (define_delay (eq_attr "slottable" "has_slot")
>   [(eq_attr "slottable" "yes") (nil) (nil)
>    (eq_attr "slottable" "yes") (nil) (nil)])
>
> So in define_insn for call i can have
> (set_attr "slottable" "has_slot")
>
>
> Now imagine that i have 3 patterns : Pattern A with two instructions
> in its template, Pattern B and Pattern C with only one instruction in
> its template.
> When it comes to filling the call instruction delay slot if slot 1 is
> filled with Pattern A then there is no need to fill slot 2. But if its
> filled with Pattern C or Pattern B, then slot 2 should be filled with
> Pattern B or Pattern C, but not Pattern A.
> Will i be able to do this in the back-end?

Ah, OK.  It's easy enough to say that you can't put pattern A in slot
2.  But there is no way to say that if pattern A is in slot 1, then
slot 2 is not available.

Ian


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