This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mtlo/mflo instructions when issue width is increased (MIPS 5kc)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Cherry Vanc <cherry dot vanc at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 17 Sep 2014 21:13:02 -0500
- Subject: Re: mtlo/mflo instructions when issue width is increased (MIPS 5kc)
- Authentication-results: sourceware.org; auth=none
- References: <CANqEaAd6SwZNy4fLYK3QBqMW3O4khL8tYps72Q4Ub=Go75UjFw at mail dot gmail dot com>
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