Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-05-09 Thread Nick Clifton
Hi Kaushik, > gcc/ChangeLog > 2016-05-04 Kaushik Phatak > > * config/rl78/rl78.c (rl78_expand_prologue): Save the MDUC related > registers in all interrupt handlers if necessary. > (rl78_option_override): Add warning. >

RE: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-05-04 Thread Kaushik Phatak
-interrupts +Specifies that interrupt handler functions should preserve the +MDUC registers. This is only necessary if normal code might use +the MDUC registers, for example because it performs multiplication +and division operations. The default is to ignore the MDUC registers +as this makes th

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-01-12 Thread Nick Clifton
Hi Kaushik, +/* Structure for G13 MDUC registers. */ +struct mduc_reg_type +{ + unsigned int address; + enum machine_mode mode; + bool is_volatile; +}; + +struct mduc_reg_type mduc_regs[NUM_OF_MDUC_REGS] = + {{0xf00e8, QImode, true}, + {0x0, HImode, true}, + {0x2, HImode,

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-01-12 Thread Mike Stump
On Jan 11, 2016, at 11:20 PM, Kaushik M Phatak wrote: > Kindly review the updated patch and let me know if it is OK. My review comment is still outstanding.

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-01-11 Thread Kaushik M Phatak
n operations. The default is to ignore the MDUC registers +as this makes the interrupt handlers faster. The target option -mg13 +needs to be passed for this to work as this feature is only available +on the G13 target (S2 core). The option will not have any effect if +the target does not have multi

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-01-07 Thread Kaushik M Phatak
Hi Mike, Thanks for the feedback regarding the ABI. I have added Nick and DJ in the loop to see if they can review this patch posted last month, https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00733.html Best Regards, Kaushik On Wed, Dec 9, 2015 at 10:23 PM, Mike Stump

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2016-01-07 Thread Nick Clifton
Hi Kaushik, Just a few comments on the patch itself: +/* Check if the block uses mul/div insns. */ +int +check_mduc_usage () I would suggest: static bool check_mduc_usage (void) instead, since this is a boolean function, only used in the rl78.c file, and it takes no arguments. +

RE: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2015-12-07 Thread Kaushik Phatak
Hi DJ, Please find attached an updated patch which tries to address the points raised by you in my earlier attempt, https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01729.html 1. Added an option for -msave.. and -mno-save.. The default will be to save the MDUC registers for the g13 target in

RE: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2015-08-27 Thread Kaushik Phatak
: [PATCH : RL78] Disable interrupts during hardware multiplication routines

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2015-08-27 Thread Mike Stump
On Aug 27, 2015, at 6:13 AM, Kaushik Phatak kaushik.pha...@kpit.com wrote:Hi DJ, I have worked out an updated patch, which would save the MDUC specific registers in the interrupt routine when the option '-msave-mduc-in-interrupts' is passed. This gets active only for the G13 targets. So,

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2015-08-27 Thread DJ Delorie
I have worked out an updated patch, which would save the MDUC specific registers in the interrupt routine when the option '-msave-mduc-in-interrupts' is passed. This gets active only for the G13 targets. Perhaps we should have both a -msave... and -mno-save... (gcc provides these by

Re: [PATCH : RL78] Disable interrupts during hardware multiplication routines

2015-06-05 Thread DJ Delorie
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