From ca9acfa997a9e771e24937b6a7ee1e1e43ce06e8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 20 Jun 2022 18:42:26 +0100 Subject: [PATCH] add absolute-signed-diff next to absolute-unsigned-diff --- openpower/isa/av.mdwn | 18 ++++++++++++++- openpower/isatables/minor_22.csv | 1 + src/openpower/decoder/isa/caller.py | 5 +++++ src/openpower/decoder/power_enums.py | 2 +- src/openpower/sv/trans/svp64.py | 5 ++++- src/openpower/test/bitmanip/av_cases.py | 30 +++++++++++++++++++++++-- 6 files changed, 56 insertions(+), 5 deletions(-) diff --git a/openpower/isa/av.mdwn b/openpower/isa/av.mdwn index 3c89b569..2498163c 100644 --- a/openpower/isa/av.mdwn +++ b/openpower/isa/av.mdwn @@ -86,6 +86,22 @@ Special Registers Altered: CR0 (if Rc=1) +# DRAFT Absolute Signed Difference + +X-Form + +* absds RT,RA,RB (Rc=0) +* absds. RT,RA,RB (Rc=1) + +Pseudo-code: + + if (RA) < (RB) then RT <- ¬(RA) + (RB) + 1 + else RT <- ¬(RB) + (RA) + 1 + +Special Registers Altered: + + CR0 (if Rc=1) + # DRAFT Absolute Unsigned Difference X-Form @@ -95,7 +111,7 @@ X-Form Pseudo-code: - if (RA) < (RB) then RT <- ¬(RA) + (RB) + 1 + if (RA)