On 20.06.2017 01:44, Richard Henderson wrote: > 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. > > Not so. We can also get here with fc == 0 && sc == 4.
Uh, right, sorry for the confusion! Thomas