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.
>
-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
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,
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.
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
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
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.
+
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
: [PATCH : RL78] Disable interrupts during hardware multiplication
routines
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,
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
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
12 matches
Mail list logo