From: Michael LeBeane Date: Wed, 9 May 2018 21:02:17 +0000 (-0400) Subject: arch-gcn3: Fix V_MAD_I32_I24 sign extension X-Git-Tag: v20.1.0.0~544 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22190c01654269e6f4964f7295df6af73cb8d100;p=gem5.git arch-gcn3: Fix V_MAD_I32_I24 sign extension We are not properly sign extending the bits we hack off for V_MAD_I32_I24. This fixes rnn_fwdBwd 64 1 1 lstm pte assertion failure. Change-Id: I2516e5715227cbd822e6a62630674f64f7a109e0 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29928 Reviewed-by: Anthony Gutierrez Reviewed-by: Matt Sinclair Maintainer: Anthony Gutierrez Tested-by: kokoro --- diff --git a/src/arch/gcn3/insts/instructions.cc b/src/arch/gcn3/insts/instructions.cc index 32719ad27..0256d469b 100644 --- a/src/arch/gcn3/insts/instructions.cc +++ b/src/arch/gcn3/insts/instructions.cc @@ -27446,8 +27446,8 @@ namespace Gcn3ISA for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) { if (wf->execMask(lane)) { - vdst[lane] = bits(src0[lane], 23, 0) * bits(src1[lane], 23, 0) - + src2[lane]; + vdst[lane] = sext<24>(bits(src0[lane], 23, 0)) + * sext<24>(bits(src1[lane], 23, 0)) + src2[lane]; } }