[flang] More tests; full build and test cycle.
Original-commit: flang-compiler/f18@ac36364304 Reviewed-on: https://github.com/flang-compiler/f18/pull/101 Tree-same-pre-rewrite: false
This commit is contained in:
parent
9c51fbc36e
commit
e1ff93a4d9
|
|
@ -360,7 +360,7 @@ public:
|
|||
// "size" bits are shifted circularly in place by "count" positions;
|
||||
// the shift is leftward if count is nonnegative, rightward otherwise.
|
||||
// Higher-order bits are unchanged.
|
||||
constexpr FixedPoint ISHFTC(int count, int size) const {
|
||||
constexpr FixedPoint ISHFTC(int count, int size = bits) const {
|
||||
if (count == 0 || size <= 0) {
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -370,11 +370,8 @@ public:
|
|||
if ((count %= size) == 0) {
|
||||
return *this;
|
||||
}
|
||||
int middleBits, leastBits;
|
||||
if (count > 0) {
|
||||
middleBits = size - count;
|
||||
leastBits = count;
|
||||
} else {
|
||||
int middleBits{size - count}, leastBits{count};
|
||||
if (count < 0) {
|
||||
middleBits = -count;
|
||||
leastBits = size + count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,11 @@ template<int BITS, typename FP = FixedPoint<BITS>> void exhaustiveTesting() {
|
|||
}
|
||||
}
|
||||
MATCH(trailcheck, a.TRAILZ())("%s, x=0x%llx", desc, x);
|
||||
// TODO test BTEST, DIM, MODULO, ISHFTC, DSHIFTL/R
|
||||
for (int j{0}; j < BITS; ++j) {
|
||||
MATCH((x >> j) & 1, a.BTEST(j))
|
||||
("%s, x=0x%llx, bit %d", desc, x, j);
|
||||
}
|
||||
// TODO test DIM, MODULO, ISHFTC, DSHIFTL/R
|
||||
// TODO test IBCLR, IBSET, IBITS, MAX, MIN, MERGE_BITS, RANGE, SIGN
|
||||
|
||||
Ordering ord{Ordering::Equal};
|
||||
|
|
|
|||
Loading…
Reference in New Issue