From 064d1a5d5dfef2f85a5c8078e4119bbbd43e4514 Mon Sep 17 00:00:00 2001 From: David Given Date: Mon, 31 Oct 2016 19:52:17 +0100 Subject: [PATCH] Use fmadd for multiply-and-add instructions. --- mach/powerpc/mcg/table | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mach/powerpc/mcg/table b/mach/powerpc/mcg/table index 61729d308..159d0332b 100644 --- a/mach/powerpc/mcg/table +++ b/mach/powerpc/mcg/table @@ -711,6 +711,14 @@ PATTERNS FPU4R(DIVF.F, "fdivs") FPU8R(DIVF.D, "fdiv") + out:(double)reg = ADDF.D(MULF.D(m1:(double)reg, m2:(double)reg), m3:(double)reg) + emit "fmadd %out, %m1, %m2, %m3" + cost 4; + + out:(double)reg = ADDF.D(m3:(double)reg, MULF.D(m1:(double)reg, m2:(double)reg)) + emit "fmadd %out, %m1, %m2, %m3" + cost 4; + out:(float)reg = NEGF.F(left:(float)reg) emit "fneg %out, %left" cost 4;