Patchwork [Patch:RL78] Fix hardware multiply on G13 target

login
register
mail settings
Submitter Kaushik Phatak
Date May 13, 2013, 4:52 a.m.
Message ID <C6CA53A2A46BA7469348BDBD663AB6585308756F@KCHJEXMB02.kpit.com>
Download mbox | patch
Permalink /patch/243264/
State New
Headers show

Comments

Kaushik Phatak - May 13, 2013, 4:52 a.m.
Hi DJ,
Thanks for quick review.

>> +	nop	; Additional nop for MAC
> >
>>  	mov	a, #0x40
> Shouldn't the MOV after the nop add the extra cycle here?

Yes, this nop is not required. Tested without this and works OK.

Please find below an updated patch. Let me know if ok to commit.

Regards,
Kaushik

	2013-05-13  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>

	* config/rl78/rl78.md (mulsi3_g13): Add additional 'nop' required
	in multiply-accumulate mode
DJ Delorie - May 13, 2013, 5:24 p.m.
> Please find below an updated patch. Let me know if ok to commit.

Yup, this is OK to commit.  Thanks!

> Regards,
> Kaushik
> 
> 	2013-05-13  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
> 
> 	* config/rl78/rl78.md (mulsi3_g13): Add additional 'nop' required
> 	in multiply-accumulate mode

Patch

--- /home/fsfsrc/gcc-4.8.0-20121219/gcc/config/rl78/rl78.md	2013-01-25 16:26:27.000000000 +0530
+++ /home/new/gcc-4.8.0-20121219/gcc/config/rl78/rl78.md	2013-05-13 10:24:19.000000000 +0530
@@ -389,6 +389,7 @@ 
 	movw	ax, %H2
 	movw	0xffff2, ax	; MDAH
 	nop	; mdc += mdal * mdah
+	nop	; Additional nop for MAC
 	movw	ax, !0xf00e0	; MDCL
 	movw	%H0, ax
 	; end of mulsi macro"