|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH] target/s390x: Implement CSST |
Date: | Mon, 19 Jun 2017 08:20:43 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 06/19/2017 01:08 AM, Thomas Huth wrote:
+ /* Sanity check the function code and storage characteristic. */ + if (fc > 1 || sc > 3) { + if (!s390_has_feat(S390_FEAT_COMPARE_AND_SWAP_AND_STORE_2)) { + goto spec_exception; + } + if (fc > 2 || sc > 4 || (fc == 2 && (r3 & 1))) {I think you could omit the "fc == 2" here. fc has to be bigger than 1 due to the outer if-statement, and if it is not 2, the first "fc > 1" has already triggered. So "fc" has to be 2 here and the "fc == 2" is a redundant check.
Quite right. r~
[Prev in Thread] | Current Thread | [Next in Thread] |