This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines
- From: DJ Delorie <dj at redhat dot com>
- To: Kaushik Phatak <Kaushik dot Phatak at kpit dot com>
- Cc: gcc-patches at gcc dot gnu dot org, nickc at redhat dot com
- Date: Fri, 5 Jun 2015 02:44:42 -0400
- Subject: Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines
- Authentication-results: sourceware.org; auth=none
- References: <HKXPR03MB08064371B4EA243BB847C833FCB20 at HKXPR03MB0806 dot apcprd03 dot prod dot outlook dot com>
Have you compared the latency of the multiply instructions to the
overhead of saving those registers in the interrupt handler? What
about the case where performance is priority, and the developer knows
that the interrupt handlers don't use the multiply registers?
Also, your code doesn't properly handle the case where the interrupts
are already disabled when those functions are called. It would
re-enable interrupts before the main code was prepared for it.