From 75b7af33c1aa0ef9373a44a679da87ac4171487f Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 11 May 2023 23:44:51 -0700 Subject: [PATCH] make truediv available to pseudocode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit technically `/` in pseudocode is supposed to be real number division, with `÷` being division with result truncated to integer, however luke decided to just use `/` for integer division in pseudocode, so we need a way to work around that. --- src/openpower/decoder/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index a6d902df..982f1396 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -5,7 +5,7 @@ from openpower.decoder.selectable_int import (SelectableInt, onebit, selectconcat, FieldSelectableInt) from openpower.decoder.selectable_int import EFFECTIVELY_UNLIMITED as EU from nmutil.divmod import trunc_divs, trunc_rems -from operator import floordiv, mod +from operator import floordiv, mod, truediv # truediv used by bfp_* functions from openpower.decoder.selectable_int import selectltu as ltu from openpower.decoder.selectable_int import selectgtu as gtu from openpower.decoder.selectable_int import check_extsign -- 2.30.2