public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* mtlo/mflo instructions when issue width is increased (MIPS 5kc)
@ 2014-09-17 23:59 Cherry Vanc
  2014-09-18  2:13 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Cherry Vanc @ 2014-09-17 23:59 UTC (permalink / raw)
  To: gcc-help

I added a functional unit to the MIPS 5kc backend for memory
operations and noticed that a function started getting mtlo / mflo
instructions in the prologue/epilogue. The function does not have any
mult/div instructions.

When I debug the source of these instructions, I can only tap into the
code path when GCC is looking for the instruction suiting the RTL
pattern (final.c).

Why are these instructions being generated when I simply just added a
functional unit to the pipeline description ? How can I debug why they
are being generated in the first place ?

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mtlo/mflo instructions when issue width is increased (MIPS 5kc)
  2014-09-17 23:59 mtlo/mflo instructions when issue width is increased (MIPS 5kc) Cherry Vanc
@ 2014-09-18  2:13 ` Segher Boessenkool
  2014-09-19 23:49   ` Cherry Vanc
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2014-09-18  2:13 UTC (permalink / raw)
  To: Cherry Vanc; +Cc: gcc-help

On Wed, Sep 17, 2014 at 04:59:38PM -0700, Cherry Vanc wrote:
> I added a functional unit to the MIPS 5kc backend for memory
> operations and noticed that a function started getting mtlo / mflo
> instructions in the prologue/epilogue. The function does not have any
> mult/div instructions.
> 
> When I debug the source of these instructions, I can only tap into the
> code path when GCC is looking for the instruction suiting the RTL
> pattern (final.c).
> 
> Why are these instructions being generated when I simply just added a
> functional unit to the pipeline description ? How can I debug why they
> are being generated in the first place ?

Add -dap to your gcc command line.  Also use -S, not -c.

Cheers,


Segher

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mtlo/mflo instructions when issue width is increased (MIPS 5kc)
  2014-09-18  2:13 ` Segher Boessenkool
@ 2014-09-19 23:49   ` Cherry Vanc
  0 siblings, 0 replies; 3+ messages in thread
From: Cherry Vanc @ 2014-09-19 23:49 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-help

Thanks a lot for your comments. I figured that the IRA was spilling to
lo as adding a functional unit led to additional register pressure.

On Wed, Sep 17, 2014 at 7:13 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Wed, Sep 17, 2014 at 04:59:38PM -0700, Cherry Vanc wrote:
>> I added a functional unit to the MIPS 5kc backend for memory
>> operations and noticed that a function started getting mtlo / mflo
>> instructions in the prologue/epilogue. The function does not have any
>> mult/div instructions.
>>
>> When I debug the source of these instructions, I can only tap into the
>> code path when GCC is looking for the instruction suiting the RTL
>> pattern (final.c).
>>
>> Why are these instructions being generated when I simply just added a
>> functional unit to the pipeline description ? How can I debug why they
>> are being generated in the first place ?
>
> Add -dap to your gcc command line.  Also use -S, not -c.
>
> Cheers,
>
>
> Segher

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-19 23:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17 23:59 mtlo/mflo instructions when issue width is increased (MIPS 5kc) Cherry Vanc
2014-09-18  2:13 ` Segher Boessenkool
2014-09-19 23:49   ` Cherry Vanc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).