From 49662cbcb5d0d1d0887df0fc88defd58df147513 Mon Sep 17 00:00:00 2001 From: Ved Shanbhogue Date: Wed, 11 Oct 2023 07:59:39 -0500 Subject: [PATCH 1/2] b/h amo sign extend --- zabha.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zabha.adoc b/zabha.adoc index 76c39bb..05b9fc5 100644 --- a/zabha.adoc +++ b/zabha.adoc @@ -3,7 +3,9 @@ Zabha extends A and Zacas cite:[zacas] standard extensions by adding _byte_ (`width=0`) and _halfword_ (`width=1`) support in `width` field for atomic -memory operation instructions. +memory operation instructions. Byte and halfword AMOs always sign-extend the +value placed in `rd`, and ignore the `XLEN-1:width` bits of the original value +in `rs2`. [wavedrom, , ] .... From 113ea539568631617810185a8b08353459e536e7 Mon Sep 17 00:00:00 2001 From: Ved Shanbhogue Date: Wed, 11 Oct 2023 08:20:10 -0500 Subject: [PATCH 2/2] b/h amo sign extend --- zabha.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabha.adoc b/zabha.adoc index 05b9fc5..c861088 100644 --- a/zabha.adoc +++ b/zabha.adoc @@ -4,8 +4,8 @@ Zabha extends A and Zacas cite:[zacas] standard extensions by adding _byte_ (`width=0`) and _halfword_ (`width=1`) support in `width` field for atomic memory operation instructions. Byte and halfword AMOs always sign-extend the -value placed in `rd`, and ignore the `XLEN-1:width` bits of the original value -in `rs2`. +value placed in `rd`, and ignore the `XLEN-1:(2^(width + 3))` bits of the +original value in `rs2`. [wavedrom, , ] ....