[llvm-branch-commits] [compiler-rt] [compiler-rt][ARM] Optimized double-precision FP mul/div (PR #179923)
Simon Tatham via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Feb 24 09:02:16 PST 2026
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/179923
>From 76b373d79cdc7bf245fe8ebdce77225005a18162 Mon Sep 17 00:00:00 2001
From: Simon Tatham <simon.tatham at arm.com>
Date: Thu, 29 Jan 2026 16:07:17 +0000
Subject: [PATCH 1/3] [compiler-rt][ARM] Optimized double-precision FP mul/div
Optimized AArch32 implementations of `muldf3` and `divdf3` are
provided. The division function is particularly tricky because its
Newton-Raphson approximation strategy requires a rigorous error bound.
In this version of the commit I've left out the full supporting
machinery that validates the error bound via Gappa and Rocq, but full
details are provided via links to the upstream version of this code in
the Arm Optimized Routines repository, and to a pair of Arm Community
blog posts.
---
compiler-rt/lib/builtins/CMakeLists.txt | 2 +
compiler-rt/lib/builtins/arm/divdf3.S | 620 ++++++++++++++++++
compiler-rt/lib/builtins/arm/muldf3.S | 404 ++++++++++++
.../test/builtins/Unit/divdf3new_test.c | 471 +++++++++++++
.../test/builtins/Unit/muldf3new_test.c | 456 +++++++++++++
5 files changed, 1953 insertions(+)
create mode 100644 compiler-rt/lib/builtins/arm/divdf3.S
create mode 100644 compiler-rt/lib/builtins/arm/muldf3.S
create mode 100644 compiler-rt/test/builtins/Unit/divdf3new_test.c
create mode 100644 compiler-rt/test/builtins/Unit/muldf3new_test.c
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 6c01c7ec9d95f..b8e328f657eea 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -448,6 +448,8 @@ if(COMPILER_RT_ARM_OPTIMIZED_FP AND BUILTIN_SUPPORTED_ARCH MATCHES "arm")
arm/mulsf3.S
arm/divsf3.S
arm/adddf3.S
+ arm/muldf3.S
+ arm/divdf3.S
)
set_source_files_properties(${assembly_files}
PROPERTIES COMPILE_OPTIONS ${implicit_it_flag})
diff --git a/compiler-rt/lib/builtins/arm/divdf3.S b/compiler-rt/lib/builtins/arm/divdf3.S
new file mode 100644
index 0000000000000..48b0dbe8d346e
--- /dev/null
+++ b/compiler-rt/lib/builtins/arm/divdf3.S
@@ -0,0 +1,620 @@
+//===-- divdf3.S - double-precision floating point division ---------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the __divdf3 function (double precision floating point
+// division), with the IEEE-754 default rounding (to nearest, ties to even),
+// for the Arm and Thumb2 ISAs.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+#include "endian.h"
+
+// The basic strategy of this division code is to use Newton-Raphson iteration
+// to calculate an approximation to 1/y, then multiply it by x. This procedure
+// delivers a quotient with 10 extra bits of precision, but which isn't exact.
+// We know an upper bound on its possible error, which gives an interval of
+// possible values for the true quotient. So we can check the 10 extra bits to
+// see whether a rounding boundary lies within the interval. If not, then we
+// can round and return without worrying further; otherwise, we go to slower
+// correction code that multiplies the approximate quotient back up by y and
+// checks it against x.
+//
+// This strategy depends critically on the upper bound on the approximation
+// error. Underestimating the error introduces a bug; overestimating it costs
+// performance, by sending more cases than necessary to the slow path.
+//
+// To give high confidence of its correctness, the upper bound has been proved
+// formally by Gappa. The Gappa proof and auxiliary code are not included in
+// this version, but they can be found in the Arm Optimized Routines repository
+//
+// https://github.com/ARM-software/optimized-routines/blob/bf3e44c3784dd3e18d3d5232e13b4d81f232310b/fp/at32/ddiv.S
+// https://github.com/ARM-software/optimized-routines/blob/bf3e44c3784dd3e18d3d5232e13b4d81f232310b/fp/auxiliary/ddiv-prove.py
+// https://github.com/ARM-software/optimized-routines/blob/bf3e44c3784dd3e18d3d5232e13b4d81f232310b/fp/auxiliary/ddiv-diagnostics.c
+//
+// and a pair of blog posts describing the concepts and procedure are here:
+//
+// https://developer.arm.com/community/arm-community-blogs/b/embedded-and-microcontrollers-blog/posts/formally-verifying-a-floating-point-division-routine-with-gappa-p1
+// https://developer.arm.com/community/arm-community-blogs/b/embedded-and-microcontrollers-blog/posts/formally-verifying-a-floating-point-division-routine-with-gappa-p2
+
+ .syntax unified
+ .text
+ .p2align 2
+
+#if __ARM_PCS_VFP
+DEFINE_COMPILERRT_FUNCTION(__divdf3)
+ push {r4, lr}
+ VMOV_FROM_DOUBLE(r0, r1, d0)
+ VMOV_FROM_DOUBLE(r2, r3, d1)
+ bl __aeabi_ddiv
+ VMOV_TO_DOUBLE(d0, r0, r1)
+ pop {r4, pc}
+#else
+DEFINE_COMPILERRT_FUNCTION_ALIAS(__divdf3, __aeabi_ddiv)
+#endif
+
+DEFINE_COMPILERRT_FUNCTION(__aeabi_ddiv)
+
+ push {r4,r5,r6,r7,r8,lr}
+
+ // Check if either input exponent 7FF (infinity or NaN), and if so, branch
+ // out of line.
+ ldr r12, =0x07FF0000 // mask for exponent cold storage
+ bics r4, r12, xh, lsr #4 // test for Infs or NaNs
+ bicsne r4, r12, yh, lsr #4
+ beq LOCAL_LABEL(ddiv_naninf)
+
+ // Extract the exponents of the input values x and y into bits 16..26 of r14
+ // and r5 respectively, and in the process, check if either exponent is zero
+ // (so that one or both inputs are 0 or denormal). In order to combine the
+ // two tests, the second ANDS is performed conditionally, so that if x's
+ // exponent is zero then the out-of-line code at ddiv_zerodenorm might find
+ // y's exponent hasn't been set up yet.
+ //
+ // We also calculate the sign of the result, which will be needed whether or
+ // not we branch. This is saved in the low bit of r4.
+ ands r4, r12, xh, lsr #4 // get exponent of x, setting Z if it's 0
+ andsne r5, r12, yh, lsr #4 // if not, extract and test exponent of y
+ eor r6, xh, yh // XOR the input signs to get the result sign
+ orr r4, r4, r6, lsr #31 // save it in the low bit of r4
+ beq LOCAL_LABEL(ddiv_zerodenorm) // branch out of line for zeroes or denormals
+
+ // Calculate the initial exponent of the result, by subtracting the two input
+ // exponents and adjusting for the IEEE exponent bias. This value may have to
+ // be adjusted by 1 later, depending on the quotient of the mantissas.
+ //
+ // If we branched to ddiv_zerodenorm above, and it found denormals but no
+ // zeroes, it may branch back here after renormalising them. We expect the
+ // out-of-line code to have left the exponent difference in the top half of
+ // r4 (still with the output sign in the low bit), but not yet to have
+ // applied the bias. So it branches back in immediately after the SUB.
+ //
+ // The exponent bias we want is either 0x3fe or 0x3ff, depending on whether
+ // we have to shift the output mantissa by 1 below. Neither of those values
+ // fits in the immediate field of an ADD instruction, so we must use two
+ // instructions.
+ sub r4, r4, r5
+LOCAL_LABEL(ddiv_normalised): // denormal handler will come back to here
+ add r4, r4, #0x03FC0000 // add the 8 high bits of the bias 0x3FE
+ add r4, r4, #0x00020000 // add the remaining bit of the bias
+
+ // Shift both mantissas up to the top of their 64-bit register pair, and OR
+ // in the leading 1 bit, which will occupy the high bit of the high word in
+ // each case.
+ mov r5, #1<<31 // high bit for ORing in to both mantissas
+ orr xh, r5, xh, lsl #11 // shift up xh and OR in the high bit
+ orr yh, r5, yh, lsl #11 // same for yh
+ orr xh, xh, xl, lsr #21 // OR in the bits shifted out of xl into xh
+ orr yh, yh, yl, lsr #21 // same for yl and yh
+ lsl xl, xl, #11 // shift up the rest of xl
+ lsl yl, yl, #11 // same for yl
+
+ // Check if the two mantissas are exactly equal, so that the quotient is
+ // exactly a power of 2. If so, branch out of line to handle that case
+ // specially.
+ //
+ // This guarantees that when we examine the approximate quotient afterwards,
+ // we can't be confused about whether it needs to be renormalised, which
+ // would otherwise cost just as much effort as this check. Our reciprocal
+ // approximation is always an underestimate (that's in the nature of this
+ // particular Newton-Raphson iteration), so if x < y (meaning the mantissas
+ // rather than the whole floats) then even the true quotient will be less
+ // than 1, and the approximation even more so. On the other hand, if x > y,
+ // then the true quotient will be enough greater than 1 that even the largest
+ // possible error in the approximation can't make it look like less than 1.
+ //
+ // (Proof: regard x,y as normalised to the range [1,2). If x > y, then we
+ // have x ≥ y+ε, where ε is the machine epsilon. So x/y ≥ 1+ε/y > 1+ε/2. And
+ // the bound on the approximation error, given below, is far less than ε/2.)
+ cmp xh, yh
+ cmpeq xl, yl
+ beq LOCAL_LABEL(ddiv_result_is_power_of_2)
+
+ // Now we begin the actual calculation of the reciprocal approximation.
+ //
+ // We begin with our two input mantissas stored in xh:xl and yh:yl, each with
+ // its leading 1 explicit and shifted up to the top of the word. So they can
+ // be regarded as 64-bit integers with the high bit set and the bottom 11
+ // bits clear.
+
+ // Obtain an 8-bit reciprocal approximation by using the topmost 8 bits of y
+ // as a lookup table. The top bit of y is always set, so there are only 128
+ // lookup table entries, not 256. The 8-bit value we load also has its top
+ // bit set.
+ lsr r5, yh, #24 // r5 is the table index plus 0x80
+ adr r6, LOCAL_LABEL(reciptbl)-128 // so subtract 0x80 from the table address
+ ldrb r6, [r6, r5] // and load the approximation into r6
+
+ // First Newton-Raphson iteration, which expands that 8-bit approximation to
+ // a 17-bit one, again with its top bit set. We use the top 16 bits of y for
+ // this, so that we can fit the multiplications into ordinary MUL rather than
+ // UMULL.
+ //
+ // The Newton-Raphson formula to turn an approximation r ≈ 1/y into a better
+ // one is r → r(2-yr). In this case we're scaling up to integers (informal
+ // fixed point), so the 2 becomes 2^24.
+ lsr r5, yh, #16 // get top halfword of y
+ mul r7, r6, r5 // multiply it by the input value r
+ rsb r7, r7, #1<<24 // subtract from 2 (scaled up appropriately)
+ mul r7, r6, r7 // multiply again to make r(2-yr)
+ lsr r7, r7, #14 // shift down to keep only 17 bits of it
+
+ // Second iteration, expanding into a 32-bit reciprocal, using the top 31
+ // bits of y (i.e. yh shifted by 1). The first multiplication (making yr) is
+ // 32x32 → 64 bits, so we use a single UMULL; the second one making r(2-yr)
+ // is 32x64, which we do with a UMULL by the bottom half of yr and then MLA
+ // by the top half, so we only keep the low 64 bits of the full answer.
+ //
+ // The subtraction from 2 (again scaled up, this time to 2^48) is done by
+ // RSBS+RSC, interleaved with the multiplications so as to use a delay slot
+ // on CPUs that have one.
+ lsr r12, yh, #1
+ umull r6, r8, r7, r12 // r8:r6 = yr
+ rsbs r6, r6, #0 // low half of subtraction from 2
+ umull r12, lr, r7, r6 // multiply r by the low half of 2-yr
+#if !__thumb__
+ rsc r8, r8, #1<<16 // high half of subtraction from 2
+#else
+ // Thumb has no RSC, so simulate it by bitwise inversion and then ADC
+ mvn r8, r8
+ adc r8, r8, #1<<16
+#endif
+ mla r6, r7, r8, lr // multiply r by the high half of 2-yr
+
+ // Third iteration, expanding into a 64-bit reciprocal, with the leading bit
+ // expected to end up in bit 60. Now the first multiplication to make yr is
+ // 32x64 → 96 bits, so we put the product in three registers lr:r12:r8.
+ // However, we're going to discard the low word r8 completely, because it
+ // makes negligible difference. So we'll treat the output yr as 64-bit.
+ umull r8, r12, r6, yl // multiply r by bottom half of y
+ mov lr, #0 // initialize high word to 0
+ umlal r12, lr, r6, yh // multiply r by top half of y
+ // Subtract from a power of 2, as usual. But in this case the power of 2
+ // we're subtracting from is 2^64, which is just off the top of the 64-bit
+ // value in lr:r12. So in fact we're just negating the whole thing!
+ //
+ // To preserve the invariant that the approximation error is always negative,
+ // we negate via one's complement rather than two's. (This would only make a
+ // difference if r8 had happened to be exactly 0. That in turn can occur when
+ // yl=0, so one of the test cases in ddiv-diagnostics.c deliberately uses
+ // such a value, so that the intermediate results can be checked against the
+ // reference Python.)
+ mvn r12, r12
+ mvn lr, lr
+ // Now lr:r12:r8 contains 2-yr. We discard the low word r8 to reduce that to
+ // 64 bits, and do another 32x64 → 96 bit multiplication.
+ umull r5, r8, r6, r12 // multiply r by bottom half of 2-yr
+ mov r7, #0 // initialize high word to 0
+ umlal r8, r7, r6, lr // multiply r by top half of 2-yr
+
+ // That's the Newton-Raphson iteration done: we have a 64-bit approximation
+ // to 1/y. Multiply it by x to get the full approximate quotient.
+ //
+ // In principle, this would be a 64x64 → 128 bit multiplication, involving
+ // four long multiply instructions. But we only need the top 64 bits, and
+ // we're already prepared to tolerate some error in the calculations, so we
+ // cut corners: don't multiply the two low words together at all, and we
+ // discard the bottom half of each of the (low * high) partial products
+ // without bothering to propagate carries out of it.
+ //
+ // (All of these shortcuts are faithfully mimicked in the Python reference
+ // implementation which generates Gappa input, so they're all accounted for
+ // in the error analysis.)
+#if __ARM_FEATURE_DSP
+ umull r12, r6, xh, r8 // r6 = high word of x * low word of 1/y
+ umull r12, r5, xl, r7 // r5 = low word of x * high word of 1/y
+ umaal r6, r5, xh, r7 // add those to the product of both high words
+#else
+ // Alternative instruction sequence using UMLAL, if UMAAL isn't available
+ umull r12, r6, xh, r8 // r6 = high word of x * low word of 1/y
+ umull r12, lr, xl, r7 // lr = low word of x * high word of 1/y
+ adds r6, r6, lr // add those together
+ mov r5, #0 // set r5 to the carry out of that addition
+ adc r5, r5, #0
+ umlal r6, r5, xh, r7 // add that to the product of both high words
+#endif
+ // Now r5:r6 is the completed approximate quotient, with its leading bit at
+ // position either 61 or 62.
+
+ // Normalize so that the leading bit is always in bit 60, by shifting left if
+ // it isn't there already, and adjusting the output exponent by 1 to
+ // compensate.
+ //
+ // We do the test in a slightly tricky way, by arranging to set the V flag if
+ // the leading bit is in bit 60. This allows us to do the left shift under
+ // the VC condition, which is convenient because the LSLS instruction that
+ // shifts the low word left moves the top bit into the C flag without
+ // affecting V.
+ //
+ // We also save the value written into lr by the initial ADDS instruction,
+ // because that contains enough information to tell us whether we
+ // renormalised here. The correction path for quotients too close to a
+ // rounding boundary will need to recover that information.
+ adds lr, r5, #0x40000000 // set V flag if bit 62 of high word set
+ subvc r4, r4, #1<<16 // if not, correct the exponent by 1,
+ lslsvc r6, r6, #1 // shift the low word of the quotient left
+ adcvc r5, r5, r5 // and shift its top bit into the high word
+
+ // Now r5:r6 is the _normalised_ approximate quotient, with its leading bit
+ // reliably in bit 60. This is the final output of the calculation that the
+ // Gappa error-analysis proof applies to.
+
+ // That 64-bit output has bit 63 clear; the leading 1 bit of the output
+ // mantissa in bit 62, followed by 52 more mantissa bits; then 10 bits at the
+ // bottom which are used for determining rounding.
+ //
+ // Compute the _approximately_ rounded-to-nearest output mantissa, by adding
+ // half a ULP and shifting down. If we don't go to the slow path, this is the
+ // correct output mantissa. (See fdiv.S for the proof that the round-to-even
+ // tiebreaking case can't occur in floating-point division.)
+ //
+ // We keep the original version of r6, containing the ten rounding bits, so
+ // that we can test it to see if we need the slow path.
+ adds r7, r6, #1<<9 // add half a ULP, copying low word into r7
+ adc r5, r5, #0 // propagate carry into high word
+ lsr r7, r7, #10 // shift low word right
+ orr r7, r7, r5, lsl #22 // combine with bits shifted out of high word
+ lsr r5, r5, #10 // shift high word right
+
+ // Now test r6 to see whether this output mantissa can be relied on, or
+ // whether the approximation landed too close to a rounding boundary.
+ //
+ // The maximum possible error in the approximation, taking into account the
+ // initial error in each lookup table entry, the remaining mathematical error
+ // introduced by stopping after this many Newton-Raphson iterations, and
+ // every shortcut, right shift, truncation and discarding of a partial
+ // product in the algorithm above, is always negative, and less than 64 units
+ // in the last place of the 64-bit approximate quotient. That is, the true
+ // quotient lies somewhere between the 64-bit integer described as "final
+ // output of the calculation" above, and that plus 64.
+ //
+ // So if the bottom 10 bits of r6 have the value 2^9 or greater, we're safe,
+ // because the true value is _larger_ than the approximation, so if the
+ // approximation is already above the rounding boundary then so is the true
+ // value. And if those 10 bits are (2^9-64) or less then we're also safe,
+ // because even if the true value is greater by 63, it's still on the same
+ // side of the rounding boundary.
+ //
+ // We check the error by subtracting (2^9-64), so that the dangerous values
+ // of the bottom 10 bits are those in the range 0,...,63, i.e. precisely
+ // those with none of bits 6,7,8,9 set.
+ //
+ // We also combine this test with a check for underflow, because that also
+ // needs more careful handling (the mantissa must be re-rounded to a
+ // different bit position, which involves knowing whether it's exact).
+ // Underflow has happened if the exponent in the top half of r4 is negative
+ // (it's off by 1 so that the leading mantissa bit will increment it), so we
+ // test by an ASR#31 (copying the top bit of r4 into all of it) and negating.
+ // That way, the output value is zero on underflow, matching the flags from
+ // the other check.
+ sub r6, r6, #(1<<9)-64
+ tst r6, #0x3C0 // now EQ means we must go to the slow path
+ mvnsne r12, r4, asr #31 // also set EQ if underflow has happened
+ beq LOCAL_LABEL(ddiv_correction) // branch out of line to do the hard bit
+
+ // If we do go to ddiv_correction, it branches back here after the correction
+ // code has finished. Either way, we expect that r5:r7 is the result
+ // mantissa, with the top bit set, already in the correct position in the
+ // word, and already rounded to nearest.
+LOCAL_LABEL(ddiv_corrected):
+ // Recombine the output mantissa with the sign and exponent.
+ add xh, r5, r4, lsl #31 // add sign bit to top word of mantissa
+ bic r12, r4, #1 // isolate exponent in top half of r4
+ add xh, xh, r12, lsl #4 // add exponent to make the final high word
+ mov xl, r7 // move low word into the right register
+
+ // If there's no overflow or underflow, we're done.
+ //
+ // We _identified_ underflow above when we went to the slow path, but having
+ // done that, the slow path came back here, so we must check for it again.
+ // (The only purpose of the detour was to obtain accurate information about
+ // whether the quotient is exact, or needed rounding.)
+ //
+ // The output exponent, offset downwards by 1, is in the top half of r4. If
+ // it's negative, there's an underflow; if it's too large, there's an
+ // overflow. We do an approximate test for both at once via an unsigned
+ // comparison against 0x7f0, using r12 (the register in which we already
+ // cleared the sign bit stored at the bottom). This identifies _most_ normal
+ // outputs as quickly as possible.
+ //
+ // 0x7f0 isn't the maximum possible known-safe exponent, but it's the largest
+ // one that fits in the immediate field of CMP. We deal with the remaining
+ // cases in the next few instructions.
+ cmp r12, #0x7f0 << 16
+ popls {r4,r5,r6,r7,r8,pc}
+
+ // Now check the remaining cases more carefully.
+ //
+ // If r12 < 0 then we definitely have underflow. We detect overflow precisely
+ // by seeing if the _final_ output exponent (in the output register xh) is
+ // 0x7ff or more, by incrementing it and seeing if the sign is opposite from
+ // the intended output sign.
+ add lr, xh, #1<<20 // increment the output exponent field
+ teq lr, r4, lsl #31 // set N if the sign now doesn't match r4[0]
+ tstpl r12, r12 // otherwise, set N if underflow
+ poppl {r4,r5,r6,r7,r8,pc} // if neither, we've finished
+
+ // If we still haven't returned, we really do have overflow or underflow, and
+ // the sign of r12 tells us which.
+ tst r12, r12
+ bmi LOCAL_LABEL(ddiv_underflow)
+ // For overflow, correct the sign by biasing the exponent downward, and go to
+ // code that constructs an infinite return value (shared with the
+ // division-by-zero handler).
+ sub xh, xh, #0x60000000
+ pop {r4,r5,r6,r7,r8,lr} // ddiv_retinf expects no regs on the stack
+ b LOCAL_LABEL(ddiv_retinf)
+
+LOCAL_LABEL(ddiv_correction):
+ // The slow path, entered if the approximate quotient was too close to a
+ // rounding boundary to trust, and also if there's a chance of underflow (so
+ // that we can reliably determine the rounding direction, including whether
+ // the quotient was exact).
+ //
+ // Regarding the input mantissas x,y and our approximate quotient q as
+ // integers in [2^52,2^53), the quotient is an approximation to either
+ // x*2^52/y or x*2^53/y, depending on which of x,y was larger. We know that q
+ // is less than the true value of that quotient by at most a small fraction
+ // of a ULP. So the correct rounded quotient is either equal to q or to q+1,
+ // and we can decide which by multiplying back up by y: we want q - x*2^k/y
+ // to be in the range (-1/2,+1/2) (where k = 52 or 53), which is equivalent
+ // to asking if qy - x*2^k is in the range (-y/2,+y/2).
+ //
+ // That's a calculation we can do in integers using only addition and
+ // multiplication. And we know that if q itself doesn't have that property
+ // then q+1 will.
+
+ // The mantissa of y is currently right at the top of the word, which means
+ // that if the result of our check is greater than it, it will overflow. So
+ // we must start by shifting y downward. We'll put it back at the bottom of
+ // the word, where it was in the input float.
+ lsr yl, yl, #11 // shift yl right
+ orr yl, yl, yh, lsl #21 // OR in the bits shifted out of yh
+ lsr yh, yh, #11 // shift yh right
+
+ // Compute the integer qy-x. Because q is already very close to the right
+ // quotient, we expect this to be an integer at most twice the size of y,
+ // which easily fits in 64 bits. So we don't need to compute the full 128-bit
+ // product: the low 64 bits are enough.
+ umull r8, r6, r7, yl // 64-bit product of the low words
+ mla r6, r7, yh, r6 // + (high word of y) * (low word of q)
+ mla r6, r5, yl, r6 // + (high word of q) * (low word of y)
+
+ // Now we must subtract either x << 53 or x << 52. This will only affect the
+ // high word of the product we've just computed. Also the mantissa of x is
+ // already shifted left by 11. So we shift xl left by either (52-32-11) or
+ // (53-32-11), i.e. by 9 or by 10, and subtract from the high word of the
+ // product.
+ //
+ // To decide which, we consult the value left in lr by the original test for
+ // renormalization, which added 0x40000000 to the high word of the initial
+ // approximate quotient 'quot'. If that had bit 62 set (so no renormalization
+ // needed) then the addition carried into the sign bit; otherwise it didn't.
+ // So lr is positive if and only if we need to shift xl left by an extra bit.
+ tst lr, lr // did we renormalize?
+ subpl r6, r6, xl, lsl #10 // if so, subtract x<<53 from q*y
+ submi r6, r6, xl, lsl #9 // if not, subtract x<<52
+
+ // Now r6:r8 contains the residual value r = qy - x*2^k as described above.
+ // If this is between -y/2 and +y/2 then q is already the correctly rounded
+ // quotient. Otherwise, the correct quotient is q+1, so the value in r6:r8
+ // will be too small (incrementing q would add y to it). So we need to check
+ // whether r < -y/2, or equivalently whether 2r < -y (avoiding having to
+ // worry about what happens when we halve y if it's odd).
+ //
+ // As mentioned above, division can't give an exact halfway case, so we don't
+ // need to worry about the case r = y/2.
+ adds r8, r8, r8 // multiply the residual by 2
+ adc r6, r6, r6
+ adds lr, r8, yl // add y to it, discarding the result
+ adcs lr, r6, yh
+ bpl LOCAL_LABEL(ddiv_corrected) // if the answer is positive, we're OK
+
+ // If we didn't take that branch, then the approximate quotient is too small
+ // by 1, so we must increment it. But also, we adjust the residual in r6:r8
+ // to match. That residual is unused by the main epilogue code, but we also
+ // came here for any underflowing value, and the underflow handler will need
+ // the exact residual to determine the rounding direction.
+ //
+ // (We could re-test whether underflow had happened and use that to skip the
+ // update of r6:r8, but the test would cost as much effort as it saved!)
+ adds r7, r7, #1 // increment the output quotient
+ adcs r5, r5, #0
+ adds r8, r8, yl // repeat the addition of y to the residual,
+ adcs r6, r6, yh // this time keeping the result in r6:r8
+ b LOCAL_LABEL(ddiv_corrected) // finally we can rejoin the main code
+
+LOCAL_LABEL(ddiv_result_is_power_of_2):
+ // The special-case handler for the two input mantissas being equal, so that
+ // the result is an exact power of two. We set up all the output registers to
+ // the way the main code would have done it, and jump straight to
+ // ddiv_corrected. This includes setting r6:r8 to the 'residual' value
+ // computed by the slow path, in case this power-of-2 output is also an
+ // underflow, which will depend on those registers.
+ mov r5, #0x00100000 // high word of quotient mantissa = 1<<20
+ mov r7, #0 // low word of quotient mantissa = 0
+ mov r6, #0 // high word of residual = 0
+ mov r8, #0 // low word of residual = 0
+ b LOCAL_LABEL(ddiv_corrected)
+
+LOCAL_LABEL(ddiv_underflow):
+ // We come here to handle underflow. The output double, constructed naïvely
+ // from the out-of-range exponent, is in xh:xl. We expect in this situation
+ // that we've _always_ come via either the ddiv_correction slow path or the
+ // ddiv_result_is_power_of_2 special case, both of which will have set up a
+ // residual value in r6:r8 equal to q*y - x*2^k (for appropriate k). This
+ // value is positive if the quotient is slightly above the true value (i.e.
+ // was rounded up), or negative if the quotient was rounded down. But we must
+ // also distinguish the third case of the residual being exactly zero.
+ add xh, xh, #0x60000000 // apply IEEE 754 exponent bias for __dunder
+ orrs r12, r6, r8 // set r12=0 and Z=1 if quotient was exact
+ movne r12, #1 // otherwise, set r12 = +1
+ orrne r12, r12, r6, asr #31 // and change to -1 if residual is negative
+ pop {r4,r5,r6,r7,r8,lr} // pop all locally saved registers
+ b SYMBOL_NAME(__compiler_rt_dunder) // and tailcall __dunder to finish
+
+LOCAL_LABEL(ddiv_zerodenorm):
+ // We come here if either input had exponent 0, so there's at least one zero
+ // or denormal. However, we know there are no infinities or NaNs, because
+ // those were checked first and will have gone to ddiv_naninf below.
+ //
+ // First we must repeat the instruction which extracted the exponent of y
+ // into r5, this time unconditionally, in case the setup code didn't do it.
+ and r5, r12, yh, lsr #4
+
+ // If either or both input is actually zero, the answer is easy.
+ orrs lr, xl, xh, lsl #1 // is x zero?
+ beq LOCAL_LABEL(ddiv_xzero)
+ orrs lr, yl, yh, lsl #1 // is y zero?
+ beq LOCAL_LABEL(ddiv_divbyzero)
+
+ // Otherwise, delegate to __dnorm2 to handle denormals, converting them into
+ // a normalised mantissa and an out-of-range exponent. __dnorm2 expects the
+ // exponents at the bottom of their words instead of half way up, so shift
+ // down first.
+ lsr r4, r4, #16
+ lsr r5, r5, #16
+ push {r0, r1, r2, r3, r4, r5} // create a 'struct dnorm2' on the stack
+ mov r0, sp // pass it by address
+ bl SYMBOL_NAME(__compiler_rt_dnorm2)
+ pop {r0, r1, r2, r3, r4, r5}
+
+ // Rejoin the main code, with the exponent difference in the top half of r4,
+ // and the output sign in the low bit of r4. (The original setup code did the
+ // latter, but we clobbered it while setting up for __dnorm2.)
+ subs r4, r4, r5 // exponent difference, at the bottom of r4
+ lsls r4, r4, #16 // move it up to the right place
+ orr r4, r4, r6, lsr #31 // recover output sign from top bit of r6
+ b LOCAL_LABEL(ddiv_normalised) // rejoin the main code
+
+LOCAL_LABEL(ddiv_xzero):
+ // We come here if x=0. We return 0 (of the right sign) if y is not 0, and
+ // the default quiet NaN if both inputs are zero.
+ orrs lr, yl, yh, lsl #1 // is y zero?
+ beq LOCAL_LABEL(ddiv_ivo_pop) // if so, pop registers and return a NaN
+ // We know xl=0 already, so we only need to reset xh to contain the right
+ // output sign. The setup code left that in the high bit of r6.
+ and xh, r6, #0x80000000
+ pop {r4,r5,r6,r7,r8,pc}
+
+LOCAL_LABEL(ddiv_divbyzero):
+ // We come here if y=0, but x is not 0 (or we'd have gone to ddiv_xzero above
+ // instead). So we're dividing a nonzero number by zero, and must return
+ // infinity.
+ pop {r4,r5,r6,r7,r8,lr}
+ eor xh, xh, yh // combine signs to get result sign
+ b LOCAL_LABEL(ddiv_retinf)
+
+LOCAL_LABEL(ddiv_naninf):
+ // We come here knowing that at least one operand is either NaN or infinity.
+ // If there's a NaN, we can tailcall __dnan2 to do the right thing. Pop our
+ // stacked registers first: we won't need that much spare space any more, and
+ // it makes the tailcall easier if we've already done it.
+ pop {r4,r5,r6,r7,r8,lr}
+
+ // A number is a NaN if its exponent is 0x7ff and at least one bit below that
+ // is set. The CMP + ADC pair here converts the two words xh:xl into a single
+ // word containing xh shifted up by one (throwing away the sign bit which
+ // makes no difference), with its low bit set if xl was nonzero. So if that
+ // is strictly greater than 0xffe00000, then x was a NaN.
+ cmp xl, #1
+ adc r12, xh, xh
+ cmp r12, #0xFFE00000
+ bhi SYMBOL_NAME(__compiler_rt_dnan2)
+ // Now check y in the same way.
+ cmp yl, #1
+ adc r12, yh, yh
+ cmp r12, #0xFFE00000
+ bhi SYMBOL_NAME(__compiler_rt_dnan2)
+
+ // Now we know there are no NaNs. Therefore there's at least one infinity. If
+ // both operands are infinity then we have inf / inf = invalid operation and
+ // must return a NaN. We detect this by XORing the inputs' exponent fields:
+ // knowing one of them is 7FF, they XOR to zero iff the other one is too.
+ eors r12, xh, yh // XOR entire top words of the inputs
+ lsl r12, r12, #1 // shift left to discard the sign bit
+ lsrs r12, r12, #21 // shift right again to discard mantissas
+ beq LOCAL_LABEL(ddiv_ivo) // if what's left is 0, we have inf / inf
+
+ // Otherwise, there's exactly one infinity, so our answers are easy, but
+ // depend on which operand it is:
+ // infinity / anything = infinity
+ // anything / infinity = 0
+ //
+ // Determine if x is the infinity, by bitwise inverting the whole word and
+ // then shifting left and right to isolate its exponent bits.
+ mvn r12, xh, lsl #1 // invert x, shift left to discard sign
+ lsrs r12, r12, #21 // and shift right to discard mantissa
+ eor xh, xh, yh // calculate the output sign bit
+ beq LOCAL_LABEL(ddiv_retinf) // if x = inf, return infinity of that sign
+ mov xl, #0 // otherwise clear all bits of x
+ and xh, xh, #0x80000000 // other than the sign bit
+ bx lr // and return zero of the same sign
+LOCAL_LABEL(ddiv_retinf):
+ // Construct and return an infinity in xh:xl, with whatever sign bit is
+ // already in the top bit of xh.
+ mov xl, #0 // clear low word
+ mvn xh, xh, lsr #31 // shift xh[31] down to bit 0, inverted
+ mvn xh, xh, lsl #11 // uninvert, and put exponent 0x7ff below it
+ lsl xh, xh, #20 // shift back up to the top
+ bx lr
+
+ // Code to construct and return the default quiet NaN, for the cases inf/inf
+ // and 0/0. We provide two entry labels, one for callers who still need to
+ // pop all the registers this function pushed, and one for callers who have
+ // done that already.
+LOCAL_LABEL(ddiv_ivo_pop):
+ pop {r4,r5,r6,r7,r8,lr}
+LOCAL_LABEL(ddiv_ivo):
+ movw xh, 0x7ff8
+ lsls xh, xh, #16
+ mov xl, #0
+ bx lr
+
+ // Table of approximate reciprocals.
+LOCAL_LABEL(reciptbl):
+ .byte 0xFF,0xFD,0xFB,0xF9,0xF7,0xF5,0xF4,0xF2
+ .byte 0xF0,0xEE,0xED,0xEB,0xE9,0xE8,0xE6,0xE4
+ .byte 0xE3,0xE1,0xE0,0xDE,0xDD,0xDB,0xDA,0xD8
+ .byte 0xD7,0xD5,0xD4,0xD3,0xD1,0xD0,0xCF,0xCD
+ .byte 0xCC,0xCB,0xCA,0xC8,0xC7,0xC6,0xC5,0xC4
+ .byte 0xC2,0xC1,0xC0,0xBF,0xBE,0xBD,0xBC,0xBB
+ .byte 0xBA,0xB9,0xB8,0xB7,0xB6,0xB5,0xB4,0xB3
+ .byte 0xB2,0xB1,0xB0,0xAF,0xAE,0xAD,0xAC,0xAB
+ .byte 0xAA,0xA9,0xA8,0xA8,0xA7,0xA6,0xA5,0xA4
+ .byte 0xA3,0xA3,0xA2,0xA1,0xA0,0x9F,0x9F,0x9E
+ .byte 0x9D,0x9C,0x9C,0x9B,0x9A,0x99,0x99,0x98
+ .byte 0x97,0x97,0x96,0x95,0x95,0x94,0x93,0x93
+ .byte 0x92,0x91,0x91,0x90,0x8F,0x8F,0x8E,0x8E
+ .byte 0x8D,0x8C,0x8C,0x8B,0x8B,0x8A,0x89,0x89
+ .byte 0x88,0x88,0x87,0x87,0x86,0x85,0x85,0x84
+ .byte 0x84,0x83,0x83,0x82,0x82,0x81,0x81,0x80
+
+END_COMPILERRT_FUNCTION(__aeabi_ddiv)
+
+NO_EXEC_STACK_DIRECTIVE
diff --git a/compiler-rt/lib/builtins/arm/muldf3.S b/compiler-rt/lib/builtins/arm/muldf3.S
new file mode 100644
index 0000000000000..47b04cdb8272e
--- /dev/null
+++ b/compiler-rt/lib/builtins/arm/muldf3.S
@@ -0,0 +1,404 @@
+//===-- muldf3.S - double-precision floating point multiplication ---------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the __muldf3 function (double precision floating point
+// multiplication), with the IEEE-754 default rounding (to nearest, ties to
+// even), for the Arm and Thumb2 ISAs.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+#include "endian.h"
+
+ .syntax unified
+ .text
+ .p2align 2
+
+#if __ARM_PCS_VFP
+DEFINE_COMPILERRT_FUNCTION(__muldf3)
+ push {r4, lr}
+ VMOV_FROM_DOUBLE(r0, r1, d0)
+ VMOV_FROM_DOUBLE(r2, r3, d1)
+ bl __aeabi_dmul
+ VMOV_TO_DOUBLE(d0, r0, r1)
+ pop {r4, pc}
+#else
+DEFINE_COMPILERRT_FUNCTION_ALIAS(__muldf3, __aeabi_dmul)
+#endif
+
+DEFINE_COMPILERRT_FUNCTION(__aeabi_dmul)
+
+ push {r4,r5,r6,lr}
+
+ // Check if either input exponent is 000 or 7FF (i.e. not a normalized
+ // number), and if so, branch out of line. If we don't branch out of line,
+ // then we've also extracted the exponents of the input values x and y into
+ // bits 16..26 of r14 and r5 respectively. But if we do, then that hasn't
+ // necessarily been done (because the second AND might have been skipped).
+ ldr r12, =0x07FF0000
+ ands r14, r12, xh, lsr #4 // sets Z if exponent of x is 0
+ andsne r5, r12, yh, lsr #4 // otherwise, sets Z if exponent of y is 0
+ teqne r14, r12 // otherwise, sets Z if exponent of x is 7FF
+ teqne r5, r12 // otherwise, sets Z if exponent of y is 7FF
+ beq LOCAL_LABEL(uncommon) // branch out of line to handle inf/NaN/0/denorm
+
+ // Calculate the sign of the result, and put it in an unused bit of r14.
+ eor r4, xh, yh // XOR the input signs to get the result sign
+ orr r14, r14, r4, lsr #31 // save it in the low bit of r14
+
+ // Clear the exponent and sign bits from the top word of each mantissa, and
+ // set the leading mantissa bit in each one, so that they're in the right
+ // form to be multiplied.
+ bic xh, xh, r12, lsl #5 // r12 = 0x07FF0000, so r12 << 5 = 0xFF800000
+ bic yh, yh, r12, lsl #5
+ orr xh, xh, #1<<20
+ orr yh, yh, #1<<20
+
+ // Now we're ready to multiply mantissas. This is also the place we'll come
+ // back to after decoding denormal inputs. The denormal decoding will also
+ // have to set up the same register contents:
+ // - fractions in xh/xl and yh/yl, with leading bits at bit 20 of xh/yh
+ // - exponents in r14 and r5, starting at bit 16
+ // - output sign in r14 bit 0
+LOCAL_LABEL(mul):
+
+ // Multiply the two mantissas as if they were full 64-bit words, delivering a
+ // 128-bit output in four registers. We provide three different ways to do
+ // this, using different instructions.
+ //
+ // Interleaved with the multiplication code, we also compute the output
+ // exponent by adding the input exponents and rebiasing. This takes two
+ // instructions. We schedule each one after a multiplication, to use a delay
+ // slot from the multiplication on CPUs where there is one.
+ //
+ // We add r5 to r14, so that the output exponent is in the top half of r14,
+ // and r5 is freed up to be used in the multiplication.
+ //
+ // We rebias the exponent by subtracting 0x400, which is correct for one of
+ // the two places where the leading bit of the product could end up, and will
+ // need correcting by one in the other case.
+ //
+ // Exit conditions from the three-way #if:
+ //
+ // r4:r5:r6 are the top 96 bits of the 128-bit product, with the leading bit
+ // at either bit 8 or bit 9 of r4. The low bit of r6 is forced to 1 if any of
+ // the low 32 bits of the 128-bit product were set.
+ //
+ // The output sign is still in the low bit of r14; the top half contains the
+ // preliminary output exponent (yet to be adjusted depending on where the
+ // high bit of the product ended up).
+
+#if __ARM_FEATURE_DSP
+ // The UMAAL instruction, which computes a 64-bit product and adds two
+ // separate 32-bit values to it, makes this easy.
+ umull r6, r4, xh, yl
+ add r14, r14, r5 // add exponents, freeing up r5
+ umull r12, r5, xl, yl
+ sub r14, r14, #0x4000000 // initial rebiasing of exponent
+ umaal r6, r5, xl, yh
+ umaal r5, r4, xh, yh
+#elif ARM_FP_DMUL_USE_UMLAL
+ // The UMLAL instruction computes a 64-bit product and adds a 64-bit value to
+ // it. But it doesn't write to the carry flag, so you can't tell if the
+ // addition wrapped. Therefore you have to use it in a way that means the
+ // addition never wraps. Here we do three of the four multiplications (xl*yl,
+ // xl*yh, xh*yh) in a chain, using UMLAL for the top two, in each case with
+ // the 64-bit accumulator consisting of the top half of the previous
+ // multiplication, and a high word set to zero before the UMLAL instruction.
+ //
+ // On Cortex-M3, this is not a win over just using UMULL and doing the
+ // additions by hand, because UMLAL takes two cycles longer than UMULL, and
+ // it also costs a cycle to initialise each of the two high accumulator words
+ // to zero. If the high word of the addend were not zero then those two
+ // cycles would be doing something useful, but as it is, they're wasted time.
+ //
+ // CPUs later than Cortex-M3 - in particular, Cortex-M4 - will do both UMLAL
+ // and UMULL much faster, so that this code is a win over the plain UMULL
+ // code below. But those CPUs typically have UMAAL anyway and will use the
+ // even faster version of the code above. So this code is provided in case
+ // it's useful, but won't be enabled unless you manually #define
+ // ARM_FP_DMUL_USE_UMLAL.
+ umull r12, r6, xl, yl
+ add r14, r14, r5 // add exponents, freeing up r5
+ movs r5, #0
+ umlal r6, r5, xl, yh
+ movs r4, #0
+ umlal r5, r4, xh, yh
+ sub r14, r14, #0x4000000 // initial rebiasing of exponent
+ umull xl, yh, xh, yl
+ adds r6, r6, xl
+ adcs r5, r5, yh
+ adc r4, r4, #0
+#else
+ // Simplest approach, using plain UMULL to compute each 64-bit product, and
+ // separate ADD and ADC instructions to do the additions. On Cortex-M3 this
+ // wins over the UMLAL approach: it's one instruction longer, but three
+ // cycles quicker, since each use of UMLAL in the above version costs 2
+ // cycles.
+ umull r4, r12, xh, yl
+ add r14, r14, r5 // add exponents, freeing up r5
+ umull r6, r5, xl, yh
+ sub r14, r14, #0x4000000 // initial rebiasing of exponent
+ adds r6, r6, r4
+ adcs r5, r5, r12 // carry from here is used below
+
+ umull r4, r12, xh, yh // r12:r4 is top part
+ adc yh, r12, #0 // get carry from above addition
+ umull r12, xh, xl, yl // xh:r12 is bottom part
+
+ adds r6, r6, xh
+ adcs r5, r5, r4
+ adcs r4, yh, #0
+#endif
+
+ // Now the full 128-bit product of the two mantissas occupies the four
+ // registers r4,r5,r6,r12 (in order from MSW to LSW). Since each input
+ // mantissa was in the range [2^52,2^53), the product is in the range
+ // [2^104,2^106), which means that the lowest-order word r12 is a long way
+ // below the round bit, so that it can only affect cases so close to a
+ // rounding boundary that you need to know if it's nonzero to tell whether
+ // you're rounding to even. Start by freeing up that register, ensuring the
+ // low bit of r6 is set if anything in r12 was nonzero.
+ tst r12, r12
+ orrne r6, r6, #1
+
+ // Now we can regard the result as a 96-bit value in r4,r5,r6, with its
+ // leading bit in either bit 8 or 9 of r4. To move that bit up to its final
+ // position in bit 20, we must shift the whole thing left by either 11 or 12
+ // bits. Find out which.
+ tst r4, #0x200 // is bit 9 set?
+ bne LOCAL_LABEL(shift11) // if so, only shift by 11 bits
+
+ // In this branch, we're shifting left by 12 bits. Put the shifted result
+ // back into the output registers xh,xl, and the bits lower than the bottom
+ // mantissa bit into r4.
+ lsls xh, r4, #12 // shift each input reg left 12
+ lsls xl, r5, #12
+ lsls r4, r6, #12
+ orr xh, xh, r5, lsr #20 // and the top two right by 32-12
+ orr xl, xl, r6, lsr #20
+
+ b LOCAL_LABEL(shifted)
+
+LOCAL_LABEL(shift11):
+ // In this branch, we're shifting left by 11 bits instead of 12, and we must
+ // adjust the exponent by 1 to compensate.
+ lsls xh, r4, #11 // shift each input reg left 11
+ lsls xl, r5, #11
+ lsls r4, r6, #11
+ orr xh, xh, r5, lsr #21 // and the top two right by 32-11
+ orr xl, xl, r6, lsr #21
+ add r14, r14, #0x10000 // adjust the exponent
+
+LOCAL_LABEL(shifted):
+ // We've reconverged after shifting the mantissa, so that now the leading 1
+ // bit of the mantissa is in bit 20 of xh, and r4 contains the bits lower
+ // than the bottom of xl.
+
+ // Recombine the sign and exponent into the high bits of xh. If the exponent
+ // is over- or underflowed, this may not give a valid FP result, but because
+ // everything is put on by addition, it will be right "mod 2^64" so that we
+ // can bias the exponent back into range for underflow handling and that will
+ // recover the right sign.
+ //
+ // r14 still has the output sign in its low bit. To extract just the exponent
+ // for adding to xh, we could use BIC to clear that bit, or shift the value
+ // right. We do the latter, which saves a copy of the pre-rounding exponent
+ // in yl, to use later for overflow detection. The shift is ASR, so that if
+ // the exponent is negative due to underflow, it stays negative.
+ asr yl, r14, #16 // isolate the exponent
+ add xh, xh, yl, lsl #20 // shift it back up to add to xh
+ add xh, xh, r14, lsl #31 // then add the sign
+
+ // If we have to handle an underflow, we'll need enough information to
+ // reconstruct the rounding direction. Our strategy is
+ //
+ // - save the LSW of the output before rounding: if that differs from the
+ // LSW after rounding then we rounded up
+ // - save the round word r4: if that is zero then we didn't round at all.
+ //
+ // We're going to branch past the rounding code for a quicker exit in the
+ // case where we're exact. In that case we don't need to save the output LSW
+ // at all, because the zero round word will override whatever it would have
+ // been anyway.
+ movs r6, r4 // unconditionally save round word
+ beq LOCAL_LABEL(rounded) // branch past rounding code if exact
+ mov r5, xl // and if not, save output LSW too
+
+ // Rounding: we shift r4 left to put the round bit into the carry flag so
+ // that ADCS+ADC will conditionally increment the mantissa. But before we do
+ // the additions, we also check the Z flag, which tells us whether the
+ // remaining 31 bits are all zero. If so, we're either in the round-to-even
+ // (RTE) halfway case, or the exact case - but the exact case never came
+ // through this code at all, so it must be RTE.
+ //
+ // If those 31 bits _aren't_ all zero, we clear the top bit of r4, leaving it
+ // set only in the round-to-even case. Then (r4 >> 31) can be used to clear
+ // the low bit to perform RTE.
+ lsls r12, r4, #1 // test round word
+ bicne r4, r4, #0x80000000 // make top bit of r4 into the RTE bit
+ adcs xl, xl, #0 // conditionally increment the mantissa
+ adc xh, xh, #0 // ... and carry into its high word
+ bic xl, xl, r4, lsr #31 // round to even if r4[31] != 0
+
+LOCAL_LABEL(rounded):
+ // Now we've rounded the output. The last thing we must do is check for
+ // overflow and underflow: if neither has happened, we can return.
+ //
+ // yl contains the pre-rounding output exponent minus 1 (so that the leading
+ // mantissa bit incremented it to the right output value). If this is in the
+ // range [0,0x7fd] then the leading bit would have incremented it to
+ // [1,0x7fe], which are non-overflowed output exponents. So an unsigned check
+ // if yl >= 0x7fe detects both overflow and underflow at once.
+ movw r12, #0x7FE
+ cmp yl, r12
+ poplo {r4,r5,r6,pc}
+
+ // We have either an underflow or an overflow. We can tell which it is by
+ // doing a _signed_ comparison of yl with the same value again - and since we
+ // only just did the CMP instruction, we can reuse the same flags.
+ bge LOCAL_LABEL(overflow)
+
+ // Now we're dealing with an underflow. Set r2 to the rounding direction, by
+ // first checking xl against r5 (where we saved its pre-rounding value) to
+ // see if we rounded up or down, and then overriding that by checking r6
+ // (where we saved the round word) to see if we didn't round at all. In the
+ // latter case the comparison against r5 will deliver nonsense, but then we
+ // overwrite it, so it doesn't matter.
+ cmp xl, r5 // did we modify the LSW, i.e. round up?
+ movne r2, #-1 // if so, the true value is a bit smaller
+ moveq r2, #+1 // else it's a bit bigger
+ cmp r6, #0 // except maybe we didn't round at all
+ moveq r2, #0 // in which case the true value is exact.
+
+ // Add the IEEE 754 exponent bias, and tail-call __dunder to handle the rest
+ // of the job.
+ add xh, xh, #0x60000000
+ pop {r4,r5,r6,lr}
+ b SYMBOL_NAME(__compiler_rt_dunder)
+
+LOCAL_LABEL(overflow):
+ // Here, we overflowed, so we must return an infinity of the correct sign.
+ // Rebias the exponent, which corrects the sign bit.
+ sub xh, xh, #0x60000000
+
+ // And pop our scratch registers before falling through into dmul_retinf.
+ pop {r4,r5,r6,lr}
+
+LOCAL_LABEL(retinf):
+ // This is entered from the overflow handler and also from cases with
+ // infinite inputs. It constructs an infinity, with sign bit equal to the
+ // high bit of xh.
+ //
+ // On entry to here, we expect not to have a stack frame any more, because
+ // one of our callers will have popped it already in order to conditionally
+ // tailcall __dnan2.
+ mov xl, #0 // clear low word
+ mvn xh, xh, lsr #31 // shift xh[31] down to bit 0, inverted
+ mvn xh, xh, lsl #11 // uninvert, and put exponent 0x7ff below it
+ lsl xh, xh, #20 // shift back up to the top
+ bx lr
+
+LOCAL_LABEL(uncommon):
+ // We come here from the entry point, if any input had exponent 0 or 0x7ff.
+ // First we must repeat the instruction from the entry point that sets up r5
+ // with the exponent of y, this time unconditionally, so we know we have both
+ // exponents in the top halves of r14 and r5.
+ and r5, r12, yh, lsr #4
+
+ // Check if either exponent is 0x7ff, by comparing against the value left in
+ // r12 by the entry point. If so, branch away to handle NaNs and infinities.
+ teq r14, r12
+ teqne r5, r12
+ beq LOCAL_LABEL(naninf)
+
+ // If we didn't branch, we're dealing with finite numbers, including a zero
+ // or a denormal or both.
+ //
+ // First save the output sign.
+ eor r6, xh, yh
+
+ // Handle zeroes first, because if there's a zero we don't have to worry
+ // about denormals at all.
+ orrs r4, xl, xh, lsl #1 // is x zero?
+ orrsne r4, yl, yh, lsl #1 // or is y zero?
+ beq LOCAL_LABEL(retzero) // Return zero if so
+
+ // Otherwise, delegate to __dnorm2 to handle denormals, converting them into
+ // a normalised mantissa and an out-of-range exponent. __dnorm2 expects the
+ // exponents at the bottom of their words instead of half way up, so shift
+ // down first, and back up again afterwards.
+ //
+ // This call clobbers r12, because we didn't bother to save it on the stack.
+ // That's fine, because we don't need the constant in it any more. When we go
+ // back to dmul_mul, that will use it as a scratch register.
+ lsr r4, r14, #16
+ lsr r5, r5, #16
+ push {r0, r1, r2, r3, r4, r5} // create a 'struct dnorm2' on the stack
+ mov r0, sp // pass it by address
+ bl SYMBOL_NAME(__compiler_rt_dnorm2)
+ pop {r0, r1, r2, r3, r4, r5}
+ lsl r14, r4, #16
+ lsls r5, r5, #16
+
+ // Put the output sign at the bottom of r14, the same place the fast path
+ // would have left it. Then rejoin the fast path.
+ orr r14, r14, r6, lsr #31
+ b LOCAL_LABEL(mul)
+
+LOCAL_LABEL(retzero):
+ // Return an exact zero, with sign bit from the high bit of r6.
+ mov xl, #0 // low word is 0
+ ands xh, r6, #0x80000000 // high word is 0 except for the sign
+ pop {r4,r5,r6,pc}
+
+LOCAL_LABEL(naninf):
+ // We come here knowing that at least one operand is either NaN or infinity.
+ // If there's a NaN, we can tailcall __dnan2 to do the right thing. Pop our
+ // stacked registers first: we won't need that much spare space any more, and
+ // it makes the tailcall easier if we've already done it.
+ pop {r4,r5,r6,lr}
+
+ // A number is a NaN if its exponent is 0x7ff and at least one bit below that
+ // is set. The CMP + ADC pair here converts the two words xh:xl into a single
+ // word containing xh shifted up by one (throwing away the sign bit which
+ // makes no difference), with its low bit set if xl was nonzero. So if that
+ // is strictly greater than 0xffe00000, then x was a NaN.
+ cmp xl, #1
+ adc r12, xh, xh
+ cmp r12, #0xFFE00000
+ bhi SYMBOL_NAME(__compiler_rt_dnan2)
+ // Now check y in the same way.
+ cmp yl, #1
+ adc r12, yh, yh
+ cmp r12, #0xFFE00000
+ bhi SYMBOL_NAME(__compiler_rt_dnan2)
+
+ // Now we know there are no NaNs. Therefore there's at least one infinity. If
+ // either operand is zero then we have inf * 0 = invalid operation and must
+ // return a NaN.
+ orrs r12, xl, xh, lsl #1 // are all bits of x zero except the sign?
+ beq LOCAL_LABEL(retnan) // if so, x == 0, so y == inf
+ orrs r12, yl, yh, lsl #1 // same check the other way round
+ beq LOCAL_LABEL(retnan)
+
+ // If we have an infinity and no NaN, then we just return an infinity of the
+ // correct sign.
+ eor xh, xh, yh
+ b LOCAL_LABEL(retinf)
+
+LOCAL_LABEL(retnan):
+ // Return the default NaN, in the case where the inputs were 0 and infinity.
+ movw xh, 0x7ff8
+ lsls xh, xh, #16
+ mov xl, #0
+ bx lr
+
+END_COMPILERRT_FUNCTION(__aeabi_dmul)
+
+NO_EXEC_STACK_DIRECTIVE
diff --git a/compiler-rt/test/builtins/Unit/divdf3new_test.c b/compiler-rt/test/builtins/Unit/divdf3new_test.c
new file mode 100644
index 0000000000000..b756acf2dfeb0
--- /dev/null
+++ b/compiler-rt/test/builtins/Unit/divdf3new_test.c
@@ -0,0 +1,471 @@
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+// RUN: %clang_builtins %s %librt -o %t && %run %t
+// REQUIRES: librt_has_divdf3
+
+#include "int_lib.h"
+#include <inttypes.h>
+#include <stdio.h>
+
+#include "fp_test.h"
+
+// By default this test uses compareResultD to check the returned floats, which
+// accepts any returned NaN if the expected result is the canonical NaN value
+// 0x7ff8000000000000. For the Arm optimized FP implementation, which commits
+// to a more detailed handling of NaNs, we tighten up the check and include
+// some extra test cases specific to that NaN policy.
+#if (__arm__ && !(__thumb__ && !__thumb2__)) && COMPILER_RT_ARM_OPTIMIZED_FP
+# define EXPECT_EXACT_RESULTS
+# define ARM_NAN_HANDLING
+#endif
+
+// Returns: a / b
+COMPILER_RT_ABI double __divdf3(double a, double b);
+
+int test__divdf3(int line, uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep) {
+ double a = fromRep64(a_rep), b = fromRep64(b_rep);
+ double x = __divdf3(a, b);
+#ifdef EXPECT_EXACT_RESULTS
+ int ret = toRep64(x) != expected_rep;
+#else
+ int ret = compareResultD(x, expected_rep);
+#endif
+
+ if (ret) {
+ printf("error at line %d: __divdf3(%016" PRIx64 ", %016" PRIx64 ") = %016" PRIx64
+ ", expected %016" PRIx64 "\n",
+ line, a_rep, b_rep, toRep64(x), expected_rep);
+ }
+ return ret;
+}
+
+#define test__divdf3(a,b,x) test__divdf3(__LINE__,a,b,x)
+
+int main(void) {
+ int status = 0;
+
+ status |= test__divdf3(0x0000000000000000, 0x0000000000000001, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x000fffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x0010000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x001fffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x3ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x4014000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x7fdfffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x7fe0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x8000000000000002, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x800fffffffffffff, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x8010000000000001, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x8020000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0xc008000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0xc01c000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0xffcfffffffffffff, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0xffe0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000001, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x0000000000000001, 0x3fc0000000000000, 0x0000000000000008);
+ status |= test__divdf3(0x0000000000000001, 0x3fe0000000000000, 0x0000000000000002);
+ status |= test__divdf3(0x0000000000000001, 0x4000000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000001, 0x7fefffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000001, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0000000000000001, 0xc000000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000001, 0xffefffffffffffff, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000002, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x0000000000000002, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0000000000000009, 0x4022000000000000, 0x0000000000000001);
+ status |= test__divdf3(0x0000000000000009, 0xc022000000000000, 0x8000000000000001);
+ status |= test__divdf3(0x000ffffffffffff7, 0x3feffffffffffffe, 0x000ffffffffffff8);
+ status |= test__divdf3(0x000ffffffffffffe, 0x3feffffffffffffe, 0x000fffffffffffff);
+ status |= test__divdf3(0x000fffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x000fffffffffffff, 0x3f60000000000000, 0x009ffffffffffffe);
+ status |= test__divdf3(0x000fffffffffffff, 0x3fe0000000000000, 0x001ffffffffffffe);
+ status |= test__divdf3(0x000fffffffffffff, 0x3ff0000000000000, 0x000fffffffffffff);
+ status |= test__divdf3(0x000fffffffffffff, 0x3ff0000000000002, 0x000ffffffffffffd);
+ status |= test__divdf3(0x000fffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x000fffffffffffff, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x000fffffffffffff, 0xbff0000000000000, 0x800fffffffffffff);
+ status |= test__divdf3(0x000fffffffffffff, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0010000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x0010000000000000, 0x3ff0000000000001, 0x000fffffffffffff);
+ status |= test__divdf3(0x0010000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0010000000000001, 0x3ff0000000000002, 0x000fffffffffffff);
+ status |= test__divdf3(0x0010000000000001, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x0010000000000001, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0010000000000002, 0x3ff0000000000006, 0x000ffffffffffffc);
+ status |= test__divdf3(0x001ffffffffffffe, 0x4000000000000000, 0x000fffffffffffff);
+ status |= test__divdf3(0x001fffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x001fffffffffffff, 0x4000000000000000, 0x0010000000000000);
+ status |= test__divdf3(0x001fffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x0020000000000000, 0x0010000000000000, 0x4000000000000000);
+ status |= test__divdf3(0x0020000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x0020000000000000, 0xc000000000000000, 0x8010000000000000);
+ status |= test__divdf3(0x0020000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x0020000000000001, 0x0010000000000001, 0x4000000000000000);
+ status |= test__divdf3(0x0020000000000001, 0xc000000000000000, 0x8010000000000001);
+ status |= test__divdf3(0x0020000000000003, 0x8010000000000003, 0xc000000000000000);
+ status |= test__divdf3(0x0020000000000003, 0xc000000000000000, 0x8010000000000003);
+ status |= test__divdf3(0x3feffffffffffff7, 0x3feffffffffffffb, 0x3feffffffffffffc);
+ status |= test__divdf3(0x3feffffffffffff7, 0x3feffffffffffffe, 0x3feffffffffffff9);
+ status |= test__divdf3(0x3feffffffffffff8, 0x3feffffffffffffc, 0x3feffffffffffffc);
+ status |= test__divdf3(0x3feffffffffffff8, 0x3feffffffffffffd, 0x3feffffffffffffb);
+ status |= test__divdf3(0x3feffffffffffffa, 0x3feffffffffffff9, 0x3ff0000000000001);
+ status |= test__divdf3(0x3feffffffffffffb, 0x3feffffffffffff9, 0x3ff0000000000001);
+ status |= test__divdf3(0x3feffffffffffffc, 0x3feffffffffffff9, 0x3ff0000000000002);
+ status |= test__divdf3(0x3feffffffffffffc, 0x3feffffffffffffd, 0x3fefffffffffffff);
+ status |= test__divdf3(0x3feffffffffffffc, 0x3feffffffffffffe, 0x3feffffffffffffe);
+ status |= test__divdf3(0x3feffffffffffffc, 0x3fefffffffffffff, 0x3feffffffffffffd);
+ status |= test__divdf3(0x3feffffffffffffc, 0x3ff0000000000001, 0x3feffffffffffffa);
+ status |= test__divdf3(0x3feffffffffffffd, 0x3feffffffffffff9, 0x3ff0000000000002);
+ status |= test__divdf3(0x3feffffffffffffd, 0x3feffffffffffffc, 0x3ff0000000000001);
+ status |= test__divdf3(0x3feffffffffffffd, 0x3feffffffffffffe, 0x3fefffffffffffff);
+ status |= test__divdf3(0x3feffffffffffffd, 0x3fefffffffffffff, 0x3feffffffffffffe);
+ status |= test__divdf3(0x3feffffffffffffd, 0x3ff0000000000001, 0x3feffffffffffffb);
+ status |= test__divdf3(0x3feffffffffffffd, 0x3ff0000000000002, 0x3feffffffffffff9);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3feffffffffffff9, 0x3ff0000000000003);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3feffffffffffffc, 0x3ff0000000000001);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3feffffffffffffd, 0x3ff0000000000001);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3fefffffffffffff, 0x3fefffffffffffff);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3ff0000000000001, 0x3feffffffffffffc);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3ff0000000000002, 0x3feffffffffffffa);
+ status |= test__divdf3(0x3feffffffffffffe, 0x3ff0000000000003, 0x3feffffffffffff8);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffff9, 0x3ff0000000000003);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffc, 0x3ff0000000000002);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffd, 0x3ff0000000000001);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffe, 0x3ff0000000000001);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000001, 0x3feffffffffffffd);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000002, 0x3feffffffffffffb);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000003, 0x3feffffffffffff9);
+ status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000004, 0x3feffffffffffff7);
+ status |= test__divdf3(0x3ff0000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffff7, 0x3ff0000000000005);
+ status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffff8, 0x3ff0000000000004);
+ status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffb, 0x3ff0000000000003);
+ status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffc, 0x3ff0000000000002);
+ status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffd, 0x3ff0000000000002);
+ status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffe, 0x3ff0000000000001);
+ status |= test__divdf3(0x3ff0000000000000, 0x3fefffffffffffff, 0x3ff0000000000001);
+ status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000);
+ status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000001, 0x3feffffffffffffe);
+ status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000002, 0x3feffffffffffffc);
+ status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000003, 0x3feffffffffffffa);
+ status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000004, 0x3feffffffffffff8);
+ status |= test__divdf3(0x3ff0000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x3ff0000000000001, 0x3feffffffffffffb, 0x3ff0000000000004);
+ status |= test__divdf3(0x3ff0000000000001, 0x3feffffffffffffd, 0x3ff0000000000003);
+ status |= test__divdf3(0x3ff0000000000001, 0x3feffffffffffffe, 0x3ff0000000000002);
+ status |= test__divdf3(0x3ff0000000000001, 0x3fefffffffffffff, 0x3ff0000000000002);
+ status |= test__divdf3(0x3ff0000000000001, 0x3ff0000000000002, 0x3feffffffffffffe);
+ status |= test__divdf3(0x3ff0000000000001, 0x3ff0000000000003, 0x3feffffffffffffc);
+ status |= test__divdf3(0x3ff0000000000002, 0x3feffffffffffffc, 0x3ff0000000000004);
+ status |= test__divdf3(0x3ff0000000000002, 0x3feffffffffffffd, 0x3ff0000000000004);
+ status |= test__divdf3(0x3ff0000000000002, 0x3feffffffffffffe, 0x3ff0000000000003);
+ status |= test__divdf3(0x3ff0000000000002, 0x3fefffffffffffff, 0x3ff0000000000003);
+ status |= test__divdf3(0x3ff0000000000002, 0x3ff0000000000001, 0x3ff0000000000001);
+ status |= test__divdf3(0x3ff0000000000002, 0x3ff0000000000003, 0x3feffffffffffffe);
+ status |= test__divdf3(0x3ff0000000000003, 0x3feffffffffffffd, 0x3ff0000000000005);
+ status |= test__divdf3(0x3ff0000000000003, 0x3feffffffffffffe, 0x3ff0000000000004);
+ status |= test__divdf3(0x3ff0000000000003, 0x3fefffffffffffff, 0x3ff0000000000004);
+ status |= test__divdf3(0x3ff0000000000003, 0x3ff0000000000001, 0x3ff0000000000002);
+ status |= test__divdf3(0x3ff0000000000004, 0x3feffffffffffffe, 0x3ff0000000000005);
+ status |= test__divdf3(0x3ff0000000000004, 0x3ff0000000000001, 0x3ff0000000000003);
+ status |= test__divdf3(0x3ff0000000000004, 0x3ff0000000000007, 0x3feffffffffffffa);
+ status |= test__divdf3(0x3ff0000000000005, 0x3fefffffffffffff, 0x3ff0000000000006);
+ status |= test__divdf3(0x3ff0000000000006, 0x3ff0000000000008, 0x3feffffffffffffc);
+ status |= test__divdf3(0x3ff0000000000007, 0x3ff0000000000002, 0x3ff0000000000005);
+ status |= test__divdf3(0x3ff0000000000009, 0x3ff0000000000008, 0x3ff0000000000001);
+ status |= test__divdf3(0x3ff199999999999a, 0x3ff3333333333333, 0x3fed555555555556);
+ status |= test__divdf3(0x4000000000000000, 0x3ff0000000000000, 0x4000000000000000);
+ status |= test__divdf3(0x4000000000000000, 0xbff0000000000000, 0xc000000000000000);
+ status |= test__divdf3(0x4008000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x4008000000000000, 0xc008000000000000, 0xbff0000000000000);
+ status |= test__divdf3(0x4008000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x4014000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x4014000000000000, 0x4014000000000000, 0x3ff0000000000000);
+ status |= test__divdf3(0x4014000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x401c000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x401c000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x4020000000000000, 0x4000000000000000, 0x4010000000000000);
+ status |= test__divdf3(0x4022000000000000, 0x4008000000000000, 0x4008000000000000);
+ status |= test__divdf3(0x7f60000000000000, 0x00a0000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fcfffffffffffff, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7fdffffffffffffd, 0xc000000000000000, 0xffcffffffffffffd);
+ status |= test__divdf3(0x7fdfffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fdfffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0x3fe0000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0x4000000000000000, 0x7fd0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0xbfe0000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0xc000000000000000, 0xffd0000000000000);
+ status |= test__divdf3(0x7fe0000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x7fe0000000000003, 0xffd0000000000003, 0xc000000000000000);
+ status |= test__divdf3(0x7feffffffffffffd, 0x4010000000000000, 0x7fcffffffffffffd);
+ status |= test__divdf3(0x7feffffffffffffd, 0xc010000000000000, 0xffcffffffffffffd);
+ status |= test__divdf3(0x7fefffffffffffff, 0x0000000000000001, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fefffffffffffff, 0x3fefffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0x7fefffffffffffff, 0x7fcfffffffffffff, 0x4010000000000000);
+ status |= test__divdf3(0x7fefffffffffffff, 0x7fdfffffffffffff, 0x4000000000000000);
+ status |= test__divdf3(0x7fefffffffffffff, 0xc000000000000000, 0xffdfffffffffffff);
+ status |= test__divdf3(0x7fefffffffffffff, 0xffcfffffffffffff, 0xc010000000000000);
+ status |= test__divdf3(0x7fefffffffffffff, 0xfff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x0000000000000001, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x0010000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x001fffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x3ff0000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x4014000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x7fdfffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x7fe0000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x8000000000000002, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x800fffffffffffff, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x8010000000000001, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x8020000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0xc008000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0xc01c000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0xffcfffffffffffff, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0xffe0000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0xffefffffffffffff, 0xfff0000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x0000000000000003, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x000fffffffffffff, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x0010000000000001, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x0020000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x4000000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x4018000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x7fcfffffffffffff, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x7fd0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x8000000000000004, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x800fffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x8010000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x801fffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0xc010000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0xc020000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0xffd0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0xffdfffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000001, 0x3fe0000000000000, 0x8000000000000002);
+ status |= test__divdf3(0x8000000000000001, 0x4000000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000001, 0x7fefffffffffffff, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000001, 0xc000000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000001, 0xffefffffffffffff, 0x0000000000000000);
+ status |= test__divdf3(0x8000000000000003, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x8000000000000003, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8000000000000004, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x8000000000000004, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x800ffffffffffff8, 0x3feffffffffffffe, 0x800ffffffffffff9);
+ status |= test__divdf3(0x800fffffffffffff, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x800fffffffffffff, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x800fffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x800fffffffffffff, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8010000000000000, 0x3ff0000000000001, 0x800fffffffffffff);
+ status |= test__divdf3(0x8010000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x8010000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8010000000000001, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x8010000000000001, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x801fffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0x801fffffffffffff, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0x8020000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0x8020000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0x8020000000000001, 0x0010000000000001, 0xc000000000000000);
+ status |= test__divdf3(0x8020000000000005, 0x0010000000000005, 0xc000000000000000);
+ status |= test__divdf3(0xbff0000000000000, 0x3ff0000000000000, 0xbff0000000000000);
+ status |= test__divdf3(0xbff0000000000000, 0xbff0000000000000, 0x3ff0000000000000);
+ status |= test__divdf3(0xc000000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xc000000000000000, 0x3ff0000000000000, 0xc000000000000000);
+ status |= test__divdf3(0xc000000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0xc000000000000000, 0xbff0000000000000, 0x4000000000000000);
+ status |= test__divdf3(0xc010000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xc010000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0xc018000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xc018000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0xc018000000000000, 0xc008000000000000, 0x4000000000000000);
+ status |= test__divdf3(0xc01c000000000000, 0x401c000000000000, 0xbff0000000000000);
+ status |= test__divdf3(0xc020000000000000, 0x4000000000000000, 0xc010000000000000);
+ status |= test__divdf3(0xc020000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xc020000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0xc022000000000000, 0xc008000000000000, 0x4008000000000000);
+ status |= test__divdf3(0xffcfffffffffffff, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xffcfffffffffffff, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0xffd0000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xffd0000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |= test__divdf3(0xffd0000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xffd0000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0xffdfffffffffffff, 0x4000000000000000, 0xffcfffffffffffff);
+ status |= test__divdf3(0xffdfffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xffe0000000000000, 0x3fe0000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xffe0000000000000, 0xbfe0000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xffe0000000000001, 0x7fd0000000000001, 0xc000000000000000);
+ status |= test__divdf3(0xffeffffffffffffd, 0x4010000000000000, 0xffcffffffffffffd);
+ status |= test__divdf3(0xffeffffffffffffd, 0xc010000000000000, 0x7fcffffffffffffd);
+ status |= test__divdf3(0xffefffffffffffff, 0x7fcfffffffffffff, 0xc010000000000000);
+ status |= test__divdf3(0xffefffffffffffff, 0xffcfffffffffffff, 0x4010000000000000);
+ status |= test__divdf3(0xffefffffffffffff, 0xfff0000000000000, 0x0000000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x0000000000000003, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x000fffffffffffff, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x0010000000000001, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x0020000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x4000000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x4018000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x7fd0000000000000, 0xfff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x8000000000000004, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x800fffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x8010000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x801fffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0xc010000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0xc020000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0xffd0000000000000, 0x7ff0000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0xffefffffffffffff, 0x7ff0000000000000);
+ status |= test__divdf3(0x800ffffffdffffff, 0xc00fff8000000000, 0x0004000fffbfff00);
+ status |= test__divdf3(0xb7fbffffffffffff, 0xffe0000000000007, 0x0000000000000000);
+ status |= test__divdf3(0x3ff660beb3029ffd, 0x3ff52e22fb7ace43, 0x3ff0e79e59ccb735);
+ status |= test__divdf3(0x3ff73ddbc621eb00, 0x3ffb8224c030d747, 0x3feb095d4073d13b);
+ status |= test__divdf3(0x3ff9a3b1ff2bf973, 0x3ff42fdf35d2d3bd, 0x3ff452508f203fca);
+ status |= test__divdf3(0x3ffa2f42f2a01655, 0x3ff01310ba9f33d1, 0x3ffa103474220298);
+ status |= test__divdf3(0x3ffa6b3e65d68478, 0x3ff773ca580800a9, 0x3ff206204bf651cc);
+ status |= test__divdf3(0x3ffae840ed05aaad, 0x3ff374c8afa6bd73, 0x3ff620a0b38357dd);
+ status |= test__divdf3(0x3ffc9bff90e124f7, 0x3ff19678d03f31b9, 0x3ffa06ce5731c244);
+ status |= test__divdf3(0x3ff716518068f63e, 0x3ffea080001fffff, 0x3fe81f4927e2f813);
+ status |= test__divdf3(0x3ff30b70c9e177b3, 0x3ffdc1dbcddeaaf7, 0x3fe47ae453d79b63);
+ status |= test__divdf3(0x3ff690a0c1cf289e, 0x3ffdd0e4ec596ead, 0x3fe837c35c721292);
+ status |= test__divdf3(0x3ff9a9f18698d1c5, 0x3ffdcf214b672807, 0x3feb8cd196d1e2db);
+ status |= test__divdf3(0x3ffc412def95e9f2, 0x3ffe09fd73e44afb, 0x3fee195e4c411819);
+ status |= test__divdf3(0x3ffab674f26df917, 0x3ffe55a80dfd623d, 0x3fec2de561fb628a);
+ status |= test__divdf3(0x3ff15bb10851a33b, 0x3ffe770229894d4f, 0x3fe23b9bdf3ad4d7);
+ status |= test__divdf3(0x3ff6ce035de00c24, 0x3fff04076d288c95, 0x3fe7874738e5ef5e);
+ status |= test__divdf3(0x3ffb0e73f83fd2b4, 0x3fff01150ca4f6e3, 0x3febece97e64ff65);
+ status |= test__divdf3(0x3ff53fff6c6d7043, 0x3fffb55c0bf15be1, 0x3fe57204f8441410);
+ status |= test__divdf3(0x3ffa8aa3bbff7c4b, 0x3fffd530fa74cc5f, 0x3feaae55281a47cf);
+ status |= test__divdf3(0x3ff3004b0d901379, 0x3ffe470662686931, 0x3fe41508eef9d818);
+ status |= test__divdf3(0x3ffac10f29e80b25, 0x3ffe2fba9d423c9d, 0x3fec5c8a8148eb26);
+ status |= test__divdf3(0x3ff8a3e14fe0651f, 0x3ffdeeae50e07679, 0x3fea579ce7a3f61c);
+ status |= test__divdf3(0x3ff168321760dd0d, 0x3ffd382a2b3c2c27, 0x3fe31042c5fcbe35);
+ status |= test__divdf3(0x3ff208350f930e99, 0x3ffc80beeab6d9ed, 0x3fe43e9486314a0e);
+ status |= test__divdf3(0x3ff46a9470b46af6, 0x3ffc2e13c9335b3f, 0x3fe72f150e86f5a1);
+ status |= test__divdf3(0x3ffaf26f45d21562, 0x3ffbe6d631b290e7, 0x3feee7b30b353e95);
+ status |= test__divdf3(0x3ff5cda6f52381df, 0x3ffbe2a5bce4483f, 0x3fe90542a0e62c21);
+ status |= test__divdf3(0x3ff92aeb8209bb69, 0x3ffb57a0bdf7af6f, 0x3fed74754022b839);
+ status |= test__divdf3(0x3ff627c9c1a1903d, 0x3ffb3c161457a7e1, 0x3fea082feee891f0);
+ status |= test__divdf3(0x3ffa5fef91208fd5, 0x3ff68928392cf5e7, 0x3ff2b9c16cd0a6eb);
+ status |= test__divdf3(0x3ffdc6825d6a2ad2, 0x3ff69bb9ca89cd3f, 0x3ff5127c1399515f);
+ status |= test__divdf3(0x3ffd62dbb1150699, 0x3ff6e12d3daf7823, 0x3ff48cd52e787bc5);
+ status |= test__divdf3(0x3ffb9f0e3f946dd2, 0x3ff75a51f01f688b, 0x3ff2ecadebdfdf91);
+ status |= test__divdf3(0x3ffdf21fc13ef609, 0x3ff77a80c8098ae1, 0x3ff46843217c9c90);
+ status |= test__divdf3(0x3ff83f6d28924d31, 0x3ff7cb607bcc758f, 0x3ff04e08e26c84b7);
+ status |= test__divdf3(0x3ffef8774307cea5, 0x3ff849124d13461d, 0x3ff467851369d61a);
+ status |= test__divdf3(0x3ffd7c2259068fa2, 0x3ffa9e9faf8d6845, 0x3ff1b8e24ddeb546);
+ status |= test__divdf3(0x3fffb10b35d3977b, 0x3ffb57a0bdf7af6f, 0x3ff28b8abfdd47c7);
+ status |= test__divdf3(0x3ffdcfa4097387f1, 0x3ffbe6d631b290e7, 0x3ff1184cf4cac16b);
+ status |= test__divdf3(0x3ffcb6231a615d02, 0x3ffb98faef6f9417, 0x3ff0a552a67a8e2d);
+ status |= test__divdf3(0x3ffba5443a5d0a42, 0x3ffb3a5c10922a9d, 0x3ff03ed2622d2a26);
+ status |= test__divdf3(0x3fff3144ae86b33e, 0x3ffa58948417f235, 0x3ff2f17912d557f2);
+ status |= test__divdf3(0x3ffd68635bf6605a, 0x3ff945fce3a79f3f, 0x3ff29e0c7d6617a1);
+ status |= test__divdf3(0x3ff97e6030354676, 0x3ff906f78f460697, 0x3ff04c56a5f3136d);
+ status |= test__divdf3(0x3ffe86f743594e95, 0x3ff8444d7946422d, 0x3ff420b1e63f512e);
+ status |= test__divdf3(0x3fff12a6c5539a9a, 0x3ff7cad48079af09, 0x3ff4e564f736b864);
+ status |= test__divdf3(0x3ffa5371fe989251, 0x3ff6fc5272dc36d1, 0x3ff2533d7a4d0ee8);
+ status |= test__divdf3(0x3ffe18c0547f65d2, 0x3ff6fc9e8dd915ed, 0x3ff4f2e7f917b80e);
+ status |= test__divdf3(0x3ffd7aea8a297055, 0x3ff64eb95d608cd9, 0x3ff52500dc28664c);
+
+ // Test that the result of an operation is a NaN at all when it should be.
+ //
+ // In most configurations these tests' results are checked compared using
+ // compareResultD, so we set all the answers to the canonical NaN
+ // 0x7ff8000000000000, which causes compareResultF to accept any NaN
+ // encoding. We also use the same value as the input NaN in tests that have
+ // one, so that even in EXPECT_EXACT_RESULTS mode these tests should pass,
+ // because 0x7ff8000000000000 is still the exact expected NaN.
+ status |= test__divdf3(0x0000000000000000, 0x0000000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x0000000000000000, 0x8000000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x7ff0000000000000, 0xfff0000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x0000000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x8000000000000000, 0x8000000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0xfff0000000000000, 0xfff0000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x3ff0000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x7ff8000000000000, 0x3ff0000000000000, 0x7ff8000000000000);
+ status |= test__divdf3(0x7ff8000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+
+#ifdef ARM_NAN_HANDLING
+ // Tests specific to the NaN handling of Arm hardware, mimicked by
+ // arm/divdf3.S:
+ //
+ // - a quiet NaN is distinguished by the top mantissa bit being 1
+ //
+ // - if a signalling NaN appears in the input, the output quiet NaN is
+ // obtained by setting its top mantissa bit and leaving everything else
+ // unchanged
+ //
+ // - if both operands are signalling NaNs then the output NaN is derived
+ // from the first operand
+ //
+ // - if both operands are quiet NaNs then the output NaN is the first
+ // operand
+ //
+ // - invalid operations not involving an input NaN return the quiet
+ // NaN with fewest bits set, 0x7ff8000000000000.
+ status |= test__divdf3(0x0000000000000000, 0x7ff3758244400801, 0x7ffb758244400801);
+ status |= test__divdf3(0x0000000000000000, 0x7fff44d3f65148af, 0x7fff44d3f65148af);
+ status |= test__divdf3(0x0000000000000001, 0x7ff48607b4b37057, 0x7ffc8607b4b37057);
+ status |= test__divdf3(0x0000000000000001, 0x7ff855f2d435b33d, 0x7ff855f2d435b33d);
+ status |= test__divdf3(0x000fffffffffffff, 0x7ff169269a674e13, 0x7ff969269a674e13);
+ status |= test__divdf3(0x000fffffffffffff, 0x7ffc80978b2ef0da, 0x7ffc80978b2ef0da);
+ status |= test__divdf3(0x3ff0000000000000, 0x7ff3458ad034593d, 0x7ffb458ad034593d);
+ status |= test__divdf3(0x3ff0000000000000, 0x7ffdd8bb98c9f13a, 0x7ffdd8bb98c9f13a);
+ status |= test__divdf3(0x7fefffffffffffff, 0x7ff79a8b96250a98, 0x7fff9a8b96250a98);
+ status |= test__divdf3(0x7fefffffffffffff, 0x7ffdcc675b63bb94, 0x7ffdcc675b63bb94);
+ status |= test__divdf3(0x7ff0000000000000, 0x7ff018cfaf4d0fff, 0x7ff818cfaf4d0fff);
+ status |= test__divdf3(0x7ff0000000000000, 0x7ff83ad1ab4dfd24, 0x7ff83ad1ab4dfd24);
+ status |= test__divdf3(0x7ff48ce6c0cdd5ac, 0x0000000000000000, 0x7ffc8ce6c0cdd5ac);
+ status |= test__divdf3(0x7ff08a34f3d5385b, 0x0000000000000001, 0x7ff88a34f3d5385b);
+ status |= test__divdf3(0x7ff0a264c1c96281, 0x000fffffffffffff, 0x7ff8a264c1c96281);
+ status |= test__divdf3(0x7ff77ce629e61f0e, 0x3ff0000000000000, 0x7fff7ce629e61f0e);
+ status |= test__divdf3(0x7ff715e2d147fd76, 0x7fefffffffffffff, 0x7fff15e2d147fd76);
+ status |= test__divdf3(0x7ff689a2031f1781, 0x7ff0000000000000, 0x7ffe89a2031f1781);
+ status |= test__divdf3(0x7ff5dfb4a0c8cd05, 0x7ff11c1fe9793a33, 0x7ffddfb4a0c8cd05);
+ status |= test__divdf3(0x7ff5826283ffb5d7, 0x7fff609b83884e81, 0x7ffd826283ffb5d7);
+ status |= test__divdf3(0x7ff7cb03f2e61d42, 0x8000000000000000, 0x7fffcb03f2e61d42);
+ status |= test__divdf3(0x7ff2adc8dfe72c96, 0x8000000000000001, 0x7ffaadc8dfe72c96);
+ status |= test__divdf3(0x7ff4fc0bacc707f2, 0x800fffffffffffff, 0x7ffcfc0bacc707f2);
+ status |= test__divdf3(0x7ff76248c8c9a619, 0xbff0000000000000, 0x7fff6248c8c9a619);
+ status |= test__divdf3(0x7ff367972fce131b, 0xffefffffffffffff, 0x7ffb67972fce131b);
+ status |= test__divdf3(0x7ff188f5ac284e92, 0xfff0000000000000, 0x7ff988f5ac284e92);
+ status |= test__divdf3(0x7ffed4c22e4e569d, 0x0000000000000000, 0x7ffed4c22e4e569d);
+ status |= test__divdf3(0x7ffe95105fa3f339, 0x0000000000000001, 0x7ffe95105fa3f339);
+ status |= test__divdf3(0x7ffb8d33dbb9ecfb, 0x000fffffffffffff, 0x7ffb8d33dbb9ecfb);
+ status |= test__divdf3(0x7ff874e41dc63e07, 0x3ff0000000000000, 0x7ff874e41dc63e07);
+ status |= test__divdf3(0x7ffe27594515ecdf, 0x7fefffffffffffff, 0x7ffe27594515ecdf);
+ status |= test__divdf3(0x7ffeac86d5c69bdf, 0x7ff0000000000000, 0x7ffeac86d5c69bdf);
+ status |= test__divdf3(0x7ff97d657b99f76f, 0x7ff7e4149862a796, 0x7fffe4149862a796);
+ status |= test__divdf3(0x7ffad17c6aa33fad, 0x7ffd898893ad4d28, 0x7ffad17c6aa33fad);
+ status |= test__divdf3(0x7ff96e04e9c3d173, 0x8000000000000000, 0x7ff96e04e9c3d173);
+ status |= test__divdf3(0x7ffec01ad8da3abb, 0x8000000000000001, 0x7ffec01ad8da3abb);
+ status |= test__divdf3(0x7ffd1d565c495941, 0x800fffffffffffff, 0x7ffd1d565c495941);
+ status |= test__divdf3(0x7ffe3d24f1e474a7, 0xbff0000000000000, 0x7ffe3d24f1e474a7);
+ status |= test__divdf3(0x7ffc206f2bb8c8ce, 0xffefffffffffffff, 0x7ffc206f2bb8c8ce);
+ status |= test__divdf3(0x7ff93efdecfb7d3b, 0xfff0000000000000, 0x7ff93efdecfb7d3b);
+ status |= test__divdf3(0x8000000000000000, 0x7ff2ee725d143ac5, 0x7ffaee725d143ac5);
+ status |= test__divdf3(0x8000000000000000, 0x7ffbba26e5c5fe98, 0x7ffbba26e5c5fe98);
+ status |= test__divdf3(0x8000000000000001, 0x7ff7818a1cd26df9, 0x7fff818a1cd26df9);
+ status |= test__divdf3(0x8000000000000001, 0x7ffaee6cc63b5292, 0x7ffaee6cc63b5292);
+ status |= test__divdf3(0x800fffffffffffff, 0x7ff401096edaf79d, 0x7ffc01096edaf79d);
+ status |= test__divdf3(0x800fffffffffffff, 0x7ffbf1778c7a2e59, 0x7ffbf1778c7a2e59);
+ status |= test__divdf3(0xbff0000000000000, 0x7ff2e8fb0201c496, 0x7ffae8fb0201c496);
+ status |= test__divdf3(0xbff0000000000000, 0x7ffcb6a5adb2e154, 0x7ffcb6a5adb2e154);
+ status |= test__divdf3(0xffefffffffffffff, 0x7ff1ea1bfc15d71d, 0x7ff9ea1bfc15d71d);
+ status |= test__divdf3(0xffefffffffffffff, 0x7ffae0766e21efc0, 0x7ffae0766e21efc0);
+ status |= test__divdf3(0xfff0000000000000, 0x7ff3b364cffbdfe6, 0x7ffbb364cffbdfe6);
+ status |= test__divdf3(0xfff0000000000000, 0x7ffd0d3223334ae3, 0x7ffd0d3223334ae3);
+
+#endif // ARM_NAN_HANDLING
+
+ return status;
+}
diff --git a/compiler-rt/test/builtins/Unit/muldf3new_test.c b/compiler-rt/test/builtins/Unit/muldf3new_test.c
new file mode 100644
index 0000000000000..809f40a95b95a
--- /dev/null
+++ b/compiler-rt/test/builtins/Unit/muldf3new_test.c
@@ -0,0 +1,456 @@
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+// RUN: %clang_builtins %s %librt -o %t && %run %t
+// REQUIRES: librt_has_muldf3
+
+#include "int_lib.h"
+#include <inttypes.h>
+#include <stdio.h>
+
+#include "fp_test.h"
+
+// By default this test uses compareResultD to check the returned floats, which
+// accepts any returned NaN if the expected result is the canonical NaN value
+// 0x7ff8000000000000. For the Arm optimized FP implementation, which commits
+// to a more detailed handling of NaNs, we tighten up the check and include
+// some extra test cases specific to that NaN policy.
+#if (__arm__ && !(__thumb__ && !__thumb2__)) && COMPILER_RT_ARM_OPTIMIZED_FP
+# define EXPECT_EXACT_RESULTS
+# define ARM_NAN_HANDLING
+#endif
+
+// Returns: a * b
+COMPILER_RT_ABI double __muldf3(double a, double b);
+
+int test__muldf3(int line, uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep) {
+ double a = fromRep64(a_rep), b = fromRep64(b_rep);
+ double x = __muldf3(a, b);
+#ifdef EXPECT_EXACT_RESULTS
+ int ret = toRep64(x) != expected_rep;
+#else
+ int ret = compareResultD(x, expected_rep);
+#endif
+
+ if (ret) {
+ printf("error at line %d: __muldf3(%016" PRIx64 ", %016" PRIx64 ") = %016" PRIx64
+ ", expected %016" PRIx64 "\n",
+ line, a_rep, b_rep, toRep64(x), expected_rep);
+ }
+ return ret;
+}
+
+#define test__muldf3(a,b,x) test__muldf3(__LINE__,a,b,x)
+
+int main(void) {
+ int status = 0;
+
+ status |= test__muldf3(0x0000000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x000fffffffffffff, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x001fffffffffffff, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x3ff0000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x7fdfffffffffffff, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x8000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x8000000000000002, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x800fffffffffffff, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x8010000000000001, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0x8020000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0xc008000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0xffcfffffffffffff, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0xffe0000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000000, 0xffefffffffffffff, 0x8000000000000000);
+ status |= test__muldf3(0x0000000000000001, 0x0000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000001, 0x0000000000000001, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000001, 0x3fe0000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x0000000000000001, 0x3fefffffffffffff, 0x0000000000000001);
+ status |= test__muldf3(0x0000000000000001, 0x3ff0000000000000, 0x0000000000000001);
+ status |= test__muldf3(0x0000000000000001, 0x4000000000000000, 0x0000000000000002);
+ status |= test__muldf3(0x0000000000000001, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x0000000000000001, 0xbfefffffffffffff, 0x8000000000000001);
+ status |= test__muldf3(0x0000000000000006, 0x3fe0000000000000, 0x0000000000000003);
+ status |= test__muldf3(0x0000000000000006, 0xbfe0000000000000, 0x8000000000000003);
+ status |= test__muldf3(0x0000000000000008, 0x3fc0000000000000, 0x0000000000000001);
+ status |= test__muldf3(0x000ffffffffffff7, 0x8020000000000003, 0x8000000000000000);
+ status |= test__muldf3(0x000ffffffffffff8, 0x3ff0000000000001, 0x000ffffffffffff9);
+ status |= test__muldf3(0x000ffffffffffff8, 0x3ff0000000000008, 0x0010000000000000);
+ status |= test__muldf3(0x000ffffffffffff8, 0xbff0000000000001, 0x800ffffffffffff9);
+ status |= test__muldf3(0x000ffffffffffff8, 0xbff0000000000008, 0x8010000000000000);
+ status |= test__muldf3(0x000ffffffffffffc, 0x4000000000000000, 0x001ffffffffffff8);
+ status |= test__muldf3(0x000ffffffffffffe, 0x3feffffffffffffc, 0x000ffffffffffffc);
+ status |= test__muldf3(0x000ffffffffffffe, 0x3ff0000000000001, 0x000fffffffffffff);
+ status |= test__muldf3(0x000ffffffffffffe, 0xbff0000000000001, 0x800fffffffffffff);
+ status |= test__muldf3(0x000fffffffffffff, 0x000ffffffffffffe, 0x0000000000000000);
+ status |= test__muldf3(0x000fffffffffffff, 0x3cb0000000000001, 0x0000000000000001);
+ status |= test__muldf3(0x000fffffffffffff, 0x3fe0000000000001, 0x0008000000000000);
+ status |= test__muldf3(0x000fffffffffffff, 0x3ff0000000000001, 0x0010000000000000);
+ status |= test__muldf3(0x000fffffffffffff, 0x4000000000000000, 0x001ffffffffffffe);
+ status |= test__muldf3(0x0010000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x0010000000000000, 0x0010000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x0010000000000000, 0x3feffffffffffffe, 0x000fffffffffffff);
+ status |= test__muldf3(0x0010000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x0010000000000000, 0x8010000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x0010000000000000, 0xc000000000000000, 0x8020000000000000);
+ status |= test__muldf3(0x0010000000000001, 0x3feffffffffffffa, 0x000ffffffffffffe);
+ status |= test__muldf3(0x0010000000000001, 0x3feffffffffffffe, 0x0010000000000000);
+ status |= test__muldf3(0x0010000000000001, 0xc000000000000000, 0x8020000000000001);
+ status |= test__muldf3(0x0010000000000002, 0x3feffffffffffffc, 0x0010000000000000);
+ status |= test__muldf3(0x001ffffffffffff8, 0x3fe0000000000000, 0x000ffffffffffffc);
+ status |= test__muldf3(0x001ffffffffffffe, 0x3fe0000000000000, 0x000fffffffffffff);
+ status |= test__muldf3(0x001ffffffffffffe, 0xbfe0000000000000, 0x800fffffffffffff);
+ status |= test__muldf3(0x001fffffffffffff, 0x3fe0000000000000, 0x0010000000000000);
+ status |= test__muldf3(0x001fffffffffffff, 0xbfe0000000000000, 0x8010000000000000);
+ status |= test__muldf3(0x3fe0000000000000, 0x8000000000000001, 0x8000000000000000);
+ status |= test__muldf3(0x3ff0000000000000, 0x000ffffffffffffd, 0x000ffffffffffffd);
+ status |= test__muldf3(0x3ff0000000000000, 0x0020000000000003, 0x0020000000000003);
+ status |= test__muldf3(0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000);
+ status |= test__muldf3(0x3ff0000000000000, 0x4000000000000000, 0x4000000000000000);
+ status |= test__muldf3(0x3ff0000000000000, 0x8000000000000001, 0x8000000000000001);
+ status |= test__muldf3(0x3ff0000000000000, 0x8000000000000009, 0x8000000000000009);
+ status |= test__muldf3(0x3ff0000000000001, 0x3ff0000000000001, 0x3ff0000000000002);
+ status |= test__muldf3(0x3ff0000000000001, 0xbff0000000000001, 0xbff0000000000002);
+ status |= test__muldf3(0x3ff0000000000001, 0xbff0000000000002, 0xbff0000000000003);
+ status |= test__muldf3(0x3ff0000000000002, 0x3ff0000000000001, 0x3ff0000000000003);
+ status |= test__muldf3(0x3ff0000000000002, 0x7feffffffffffffe, 0x7ff0000000000000);
+ status |= test__muldf3(0x3ff0000000000001, 0x7feffffffffffffe, 0x7ff0000000000000);
+ status |= test__muldf3(0x4000000000000000, 0x0010000000000000, 0x0020000000000000);
+ status |= test__muldf3(0x4000000000000000, 0x0010000000000001, 0x0020000000000001);
+ status |= test__muldf3(0x4000000000000000, 0x3ff0000000000000, 0x4000000000000000);
+ status |= test__muldf3(0x4000000000000000, 0x4008000000000000, 0x4018000000000000);
+ status |= test__muldf3(0x4000000000000000, 0x7fd0000000000000, 0x7fe0000000000000);
+ status |= test__muldf3(0x4000000000000000, 0x7fdfffffffffffff, 0x7fefffffffffffff);
+ status |= test__muldf3(0x4000000000000000, 0x800ffffffffffffd, 0x801ffffffffffffa);
+ status |= test__muldf3(0x4000000000000000, 0x8010000000000003, 0x8020000000000003);
+ status |= test__muldf3(0x4000000000000000, 0x8010000000000005, 0x8020000000000005);
+ status |= test__muldf3(0x4000000000000000, 0xbff0000000000000, 0xc000000000000000);
+ status |= test__muldf3(0x4000000000000000, 0xffcffffffffffffd, 0xffdffffffffffffd);
+ status |= test__muldf3(0x4000000000000000, 0xffd0000000000003, 0xffe0000000000003);
+ status |= test__muldf3(0x4007ffffffffffff, 0x3feffffffffffffd, 0x4007fffffffffffd);
+ status |= test__muldf3(0x4007ffffffffffff, 0x3feffffffffffffe, 0x4007fffffffffffe);
+ status |= test__muldf3(0x4007ffffffffffff, 0x3fefffffffffffff, 0x4007fffffffffffe);
+ status |= test__muldf3(0x4007ffffffffffff, 0xbfeffffffffffffd, 0xc007fffffffffffd);
+ status |= test__muldf3(0x4008000000000000, 0x0000000000000002, 0x0000000000000006);
+ status |= test__muldf3(0x4008000000000000, 0x4000000000000000, 0x4018000000000000);
+ status |= test__muldf3(0x4008000000000000, 0x4008000000000000, 0x4022000000000000);
+ status |= test__muldf3(0x4008000000000000, 0xc000000000000000, 0xc018000000000000);
+ status |= test__muldf3(0x4008000000000001, 0x3ff0000000000001, 0x4008000000000003);
+ status |= test__muldf3(0x4008000000000001, 0x3ff0000000000003, 0x4008000000000006);
+ status |= test__muldf3(0x4008000000000001, 0xbff0000000000003, 0xc008000000000006);
+ status |= test__muldf3(0x4010000000000000, 0x0000000000000002, 0x0000000000000008);
+ status |= test__muldf3(0x4010000000000000, 0x7fcfffffffffffff, 0x7fefffffffffffff);
+ status |= test__muldf3(0x4010000000000000, 0xffcfffffffffffff, 0xffefffffffffffff);
+ status |= test__muldf3(0x4013ffffffffffff, 0x3fefffffffffffff, 0x4013fffffffffffe);
+ status |= test__muldf3(0x4014000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x4014000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x4014000000000001, 0x3ff0000000000001, 0x4014000000000002);
+ status |= test__muldf3(0x401bffffffffffff, 0x3feffffffffffffc, 0x401bfffffffffffc);
+ status |= test__muldf3(0x401bffffffffffff, 0x3fefffffffffffff, 0x401bfffffffffffe);
+ status |= test__muldf3(0x401c000000000000, 0x8000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x401c000000000000, 0xfff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x401c000000000001, 0x3ff0000000000001, 0x401c000000000003);
+ status |= test__muldf3(0x7fcffffffffffffd, 0x4010000000000000, 0x7feffffffffffffd);
+ status |= test__muldf3(0x7fcffffffffffffd, 0xc010000000000000, 0xffeffffffffffffd);
+ status |= test__muldf3(0x7fd0000000000000, 0xc000000000000000, 0xffe0000000000000);
+ status |= test__muldf3(0x7fdffffffffffffd, 0xc000000000000008, 0xfff0000000000000);
+ status |= test__muldf3(0x7fdfffffffffffff, 0xc000000000000000, 0xffefffffffffffff);
+ status |= test__muldf3(0x7fe0000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0x4000000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0x7fe0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0x7feffffffffffffe, 0x7ff0000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0xffd0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0xffd0000000000004, 0xfff0000000000000);
+ status |= test__muldf3(0x7fe0000000000000, 0xffe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x7fe0000000000009, 0x7feffffffffffffa, 0x7ff0000000000000);
+ status |= test__muldf3(0x7fe0000000000009, 0xc018000000000002, 0xfff0000000000000);
+ status |= test__muldf3(0x7fefffffffffffff, 0x0000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x001fffffffffffff, 0x7ff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x3ff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x7fdfffffffffffff, 0x7ff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x8000000000000002, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x800fffffffffffff, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x8010000000000001, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x8020000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0xc008000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0xffe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0xffefffffffffffff, 0xfff0000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0xfff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x4018000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x7fefffffffffffff, 0x8000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x8000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x8000000000000004, 0x0000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x8010000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0xc020000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x8000000000000000, 0xffd0000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x8000000000000001, 0x0000000000000001, 0x8000000000000000);
+ status |= test__muldf3(0x8000000000000001, 0x4014000000000000, 0x8000000000000005);
+ status |= test__muldf3(0x8000000000000002, 0x3ff0000000000000, 0x8000000000000002);
+ status |= test__muldf3(0x8000000000000003, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x8000000000000003, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x8000000000000004, 0xbff0000000000000, 0x0000000000000004);
+ status |= test__muldf3(0x8000000000000008, 0x3fc0000000000000, 0x8000000000000001);
+ status |= test__muldf3(0x800ffffffffffff7, 0x0020000000000003, 0x8000000000000000);
+ status |= test__muldf3(0x800ffffffffffff7, 0x3ff0000000000001, 0x800ffffffffffff8);
+ status |= test__muldf3(0x800ffffffffffffd, 0xc000000000000000, 0x001ffffffffffffa);
+ status |= test__muldf3(0x800fffffffffffff, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x800fffffffffffff, 0x3ff0000000000001, 0x8010000000000000);
+ status |= test__muldf3(0x800fffffffffffff, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x800fffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x800fffffffffffff, 0x800ffffffffffffe, 0x0000000000000000);
+ status |= test__muldf3(0x800fffffffffffff, 0xbff0000000000000, 0x000fffffffffffff);
+ status |= test__muldf3(0x800fffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x8010000000000000, 0x0010000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x8010000000000000, 0x8010000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x8010000000000001, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x8010000000000001, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0x8010000000000001, 0xbff0000000000000, 0x0010000000000001);
+ status |= test__muldf3(0x801ffffffffffffc, 0x3fe0000000000000, 0x800ffffffffffffe);
+ status |= test__muldf3(0x801ffffffffffffc, 0xbfe0000000000000, 0x000ffffffffffffe);
+ status |= test__muldf3(0x801ffffffffffffe, 0x3ff0000000000000, 0x801ffffffffffffe);
+ status |= test__muldf3(0x801fffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0x801fffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x8020000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0x8020000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xbfefffffffffffff, 0xffefffffffffffff, 0x7feffffffffffffe);
+ status |= test__muldf3(0xbff0000000000000, 0x0000000000000009, 0x8000000000000009);
+ status |= test__muldf3(0xbff0000000000000, 0x0010000000000009, 0x8010000000000009);
+ status |= test__muldf3(0xbff0000000000000, 0x3ff0000000000000, 0xbff0000000000000);
+ status |= test__muldf3(0xbff0000000000000, 0x4000000000000000, 0xc000000000000000);
+ status |= test__muldf3(0xbff0000000000000, 0xbff0000000000000, 0x3ff0000000000000);
+ status |= test__muldf3(0xbff0000000000000, 0xc000000000000000, 0x4000000000000000);
+ status |= test__muldf3(0xbff0000000000001, 0x3ff0000000000001, 0xbff0000000000002);
+ status |= test__muldf3(0xbff0000000000001, 0xbff0000000000001, 0x3ff0000000000002);
+ status |= test__muldf3(0xbff0000000000001, 0xbff0000000000002, 0x3ff0000000000003);
+ status |= test__muldf3(0xbff0000000000002, 0x3ff0000000000001, 0xbff0000000000003);
+ status |= test__muldf3(0xbff0000000000002, 0xbff0000000000001, 0x3ff0000000000003);
+ status |= test__muldf3(0xc000000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0xc000000000000000, 0x000ffffffffffffd, 0x801ffffffffffffa);
+ status |= test__muldf3(0xc000000000000000, 0x0010000000000001, 0x8020000000000001);
+ status |= test__muldf3(0xc000000000000000, 0x0010000000000005, 0x8020000000000005);
+ status |= test__muldf3(0xc000000000000000, 0x0010000000000009, 0x8020000000000009);
+ status |= test__muldf3(0xc000000000000000, 0x4008000000000000, 0xc018000000000000);
+ status |= test__muldf3(0xc000000000000000, 0x7fcfffffffffffff, 0xffdfffffffffffff);
+ status |= test__muldf3(0xc000000000000000, 0x7fd0000000000001, 0xffe0000000000001);
+ status |= test__muldf3(0xc000000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xc000000000000000, 0xbff0000000000000, 0x4000000000000000);
+ status |= test__muldf3(0xc000000000000000, 0xc008000000000000, 0x4018000000000000);
+ status |= test__muldf3(0xc007fffffffffffe, 0x7fe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xc007ffffffffffff, 0x3fefffffffffffff, 0xc007fffffffffffe);
+ status |= test__muldf3(0xc008000000000000, 0x4008000000000000, 0xc022000000000000);
+ status |= test__muldf3(0xc008000000000000, 0xc000000000000000, 0x4018000000000000);
+ status |= test__muldf3(0xc008000000000000, 0xc008000000000000, 0x4022000000000000);
+ status |= test__muldf3(0xc008000000000000, 0xffe0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xc008000000000001, 0x3ff0000000000001, 0xc008000000000003);
+ status |= test__muldf3(0xc010000000000000, 0x7fcfffffffffffff, 0xffefffffffffffff);
+ status |= test__muldf3(0xc010000000000000, 0x8000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0xc010000000000000, 0xffcfffffffffffff, 0x7fefffffffffffff);
+ status |= test__muldf3(0xc010000000000000, 0xfff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xc013fffffffffffe, 0xffe0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xc013ffffffffffff, 0xbfefffffffffffff, 0x4013fffffffffffe);
+ status |= test__muldf3(0xc014000000000001, 0xbff0000000000001, 0x4014000000000002);
+ status |= test__muldf3(0xc01bfffffffffff9, 0x7fe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xc022000000000000, 0x7fe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xc022000000000001, 0xffe0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xffcffffffffffff9, 0x7fe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xffcffffffffffff9, 0xc00fffffffffffff, 0x7feffffffffffff8);
+ status |= test__muldf3(0xffcffffffffffffd, 0x4010000000000000, 0xffeffffffffffffd);
+ status |= test__muldf3(0xffcffffffffffffd, 0xc010000000000000, 0x7feffffffffffffd);
+ status |= test__muldf3(0xffcfffffffffffff, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0xffcfffffffffffff, 0x4000000000000001, 0xffe0000000000000);
+ status |= test__muldf3(0xffcfffffffffffff, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xffd0000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |= test__muldf3(0xffd0000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xffdffffffffffff7, 0x7fd0000000000001, 0xfff0000000000000);
+ status |= test__muldf3(0xffdfffffffffffff, 0x3ff0000000000001, 0xffe0000000000000);
+ status |= test__muldf3(0xffdfffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0xffe0000000000005, 0xffe0000000000001, 0x7ff0000000000000);
+ status |= test__muldf3(0xffeffffffffffffd, 0x7fe0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xffeffffffffffffd, 0xc008000000000001, 0x7ff0000000000000);
+ status |= test__muldf3(0xffeffffffffffffd, 0xffe0000000000001, 0x7ff0000000000000);
+ status |= test__muldf3(0xffefffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |= test__muldf3(0xffefffffffffffff, 0xffefffffffffffff, 0x7ff0000000000000);
+ status |= test__muldf3(0xffefffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0x4018000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0x8000000000000004, 0x7ff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0x8010000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0xc020000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0xffd0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0xfff0000000000000, 0xfff0000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x002ffffffe000000, 0x3fcffffffffffffd, 0x000ffffffeffffff);
+ status |= test__muldf3(0xbfeffeffffffffff, 0x8010000000000100, 0x000fff80000000ff);
+ status |= test__muldf3(0x802ffffffe000000, 0x3fcffffffffffffd, 0x800ffffffeffffff);
+ status |= test__muldf3(0xbfeffeffffffffff, 0x0010000000000100, 0x800fff80000000ff);
+ status |= test__muldf3(0xbf9e8325a5aa6c8d, 0xbf9e8325a5aa6c8d, 0x3f4d180013083955);
+ status |= test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fe4000000000000, 0x3ff237a6f271c5c4);
+ status |= test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fe4000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x201d25d7ea4fa2d4, 0x1fd4000000000000, 0x00091bd37938e2e2);
+ status |= test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fe8000000000000, 0x3ff5dc61efbbba1f);
+ status |= test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fe8000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x201d25d7ea4fa2d4, 0x1fd8000000000000, 0x000aee30f7dddd10);
+ status |= test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fec000000000000, 0x3ff9811ced05ae7a);
+ status |= test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fec000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x201d25d7ea4fa2d4, 0x1fdc000000000000, 0x000cc08e7682d73d);
+ status |= test__muldf3(0x3ff265f139b6c87c, 0x3ff7000000000000, 0x3ffa728ac2f6c032);
+ status |= test__muldf3(0x6ff265f139b6c87c, 0x4ff7000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x201265f139b6c87c, 0x1fe7000000000000, 0x000d3945617b6019);
+ status |= test__muldf3(0x3ff265f139b6c87c, 0x3ff5000000000000, 0x3ff825cc9bbfe723);
+ status |= test__muldf3(0x6ff265f139b6c87c, 0x4ff5000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x201265f139b6c87c, 0x1fe5000000000000, 0x000c12e64ddff391);
+ status |= test__muldf3(0x3ffe5ab1dc9f12f9, 0x3ff0c1a10c80f0b7, 0x3fffca09666ab16e);
+ status |= test__muldf3(0x6ffe5ab1dc9f12f9, 0x4ff0c1a10c80f0b7, 0x7ff0000000000000);
+ status |= test__muldf3(0x201e5ab1dc9f12f9, 0x1fe0c1a10c80f0b7, 0x000fe504b33558b7);
+ status |= test__muldf3(0x3ffe5ab1dc9f12f9, 0x3fe73e5ef37f0f49, 0x3ff60c59a0917f00);
+ status |= test__muldf3(0x6ffe5ab1dc9f12f9, 0x4fe73e5ef37f0f49, 0x7ff0000000000000);
+ status |= test__muldf3(0x201e5ab1dc9f12f9, 0x1fd73e5ef37f0f49, 0x000b062cd048bf80);
+ status |= test__muldf3(0x3ffe5ab1dc9f12f9, 0x3fe8c1a10c80f0b7, 0x3ff77bb12a5d1d75);
+ status |= test__muldf3(0x6ffe5ab1dc9f12f9, 0x4fe8c1a10c80f0b7, 0x7ff0000000000000);
+ status |= test__muldf3(0x201e5ab1dc9f12f9, 0x1fd8c1a10c80f0b7, 0x000bbdd8952e8ebb);
+ status |= test__muldf3(0x3ffc6be665de3b1d, 0x3fe52d156619a0cb, 0x3ff2ced9f056fba8);
+ status |= test__muldf3(0x6ffc6be665de3b1d, 0x4fe52d156619a0cb, 0x7ff0000000000000);
+ status |= test__muldf3(0x201c6be665de3b1d, 0x1fd52d156619a0cb, 0x0009676cf82b7dd4);
+ status |= test__muldf3(0x3ffc6be665de3b1d, 0x3fead2ea99e65f35, 0x3ff7d2ffa8765d03);
+ status |= test__muldf3(0x6ffc6be665de3b1d, 0x4fead2ea99e65f35, 0x7ff0000000000000);
+ status |= test__muldf3(0x201c6be665de3b1d, 0x1fdad2ea99e65f35, 0x000be97fd43b2e82);
+ status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ff5c9b956d0b54b, 0x3ff82c50eb71ac34);
+ status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ff5c9b956d0b54b, 0x7ff0000000000000);
+ status |= test__muldf3(0x2011c0635d3cd39d, 0x1fe5c9b956d0b54b, 0x000c162875b8d61a);
+ status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ff23646a92f4ab5, 0x3ff434a77da664d4);
+ status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ff23646a92f4ab5, 0x7ff0000000000000);
+ status |= test__muldf3(0x2011c0635d3cd39d, 0x1fe23646a92f4ab5, 0x000a1a53bed3326a);
+ status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ffa3646a92f4ab5, 0x3ffd14d92c44cea3);
+ status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ffa3646a92f4ab5, 0x7ff0000000000000);
+ status |= test__muldf3(0x2011c0635d3cd39d, 0x1fea3646a92f4ab5, 0x000e8a6c96226751);
+ status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ff1c9b956d0b54b, 0x3ff3bc381422774d);
+ status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ff1c9b956d0b54b, 0x7ff0000000000000);
+ status |= test__muldf3(0x2011c0635d3cd39d, 0x1fe1c9b956d0b54b, 0x0009de1c0a113ba6);
+ status |= test__muldf3(0x3ff907065fd11389, 0x3fe46bad37af52b9, 0x3feff135e5756ec7);
+ status |= test__muldf3(0x6ff907065fd11389, 0x4fe46bad37af52b9, 0x7feff135e5756ec7);
+ status |= test__muldf3(0x201907065fd11389, 0x1fd46bad37af52b9, 0x0007fc4d795d5bb2);
+ status |= test__muldf3(0x3ff907065fd11389, 0x3feb9452c850ad47, 0x3ff591ee9cfee5ea);
+ status |= test__muldf3(0x6ff907065fd11389, 0x4feb9452c850ad47, 0x7ff0000000000000);
+ status |= test__muldf3(0x201907065fd11389, 0x1fdb9452c850ad47, 0x000ac8f74e7f72f5);
+ status |= test__muldf3(0x3ff761c03e198df7, 0x3fe7f47c731d43c7, 0x3ff180e675617e83);
+ status |= test__muldf3(0x6ff761c03e198df7, 0x4fe7f47c731d43c7, 0x7ff0000000000000);
+ status |= test__muldf3(0x201761c03e198df7, 0x1fd7f47c731d43c7, 0x0008c0733ab0bf41);
+ status |= test__muldf3(0x3ffce6d1246c46fb, 0x3ff0b3469ded2bcd, 0x3ffe2aa6f74c0ffd);
+ status |= test__muldf3(0x6ffce6d1246c46fb, 0x4ff0b3469ded2bcd, 0x7ff0000000000000);
+ status |= test__muldf3(0x201ce6d1246c46fb, 0x1fe0b3469ded2bcd, 0x000f15537ba607fe);
+ status |= test__muldf3(0x3ffd5701100ec79d, 0x3fee654fee13094b, 0x3ffbde74e37bb583);
+ status |= test__muldf3(0x6ffd5701100ec79d, 0x4fee654fee13094b, 0x7ff0000000000000);
+ status |= test__muldf3(0x201d5701100ec79d, 0x1fde654fee13094b, 0x000def3a71bddac1);
+ status |= test__muldf3(0x3ffce1a06e8bcfd3, 0x3ff01c54436a605b, 0x3ffd14c361885d61);
+ status |= test__muldf3(0x6ffce1a06e8bcfd3, 0x4ff01c54436a605b, 0x7ff0000000000000);
+ status |= test__muldf3(0x201ce1a06e8bcfd3, 0x1fe01c54436a605b, 0x000e8a61b0c42eb0);
+ status |= test__muldf3(0x3ff21d1a5ca518a5, 0x3ff29f0ce1150f2d, 0x3ff514cd72d743f2);
+ status |= test__muldf3(0x6ff21d1a5ca518a5, 0x4ff29f0ce1150f2d, 0x7ff0000000000000);
+ status |= test__muldf3(0x20121d1a5ca518a5, 0x1fe29f0ce1150f2d, 0x000a8a66b96ba1f9);
+ status |= test__muldf3(0x3ff031a98dbf97ba, 0x3ff4000000000000, 0x3ff43e13f12f7da8);
+ status |= test__muldf3(0x6ff031a98dbf97ba, 0x4ff4000000000000, 0x7ff0000000000000);
+ status |= test__muldf3(0x201031a98dbf97ba, 0x1fe4000000000000, 0x000a1f09f897bed4);
+ status |= test__muldf3(0x0000000000000003, 0xc00fffffffffffff, 0x800000000000000c);
+ status |= test__muldf3(0x0000000000000003, 0x400fffffffffffff, 0x000000000000000c);
+ status |= test__muldf3(0x8000000000000003, 0xc00fffffffffffff, 0x000000000000000c);
+ status |= test__muldf3(0x8000000000000003, 0x400fffffffffffff, 0x800000000000000c);
+ status |= test__muldf3(0x0000000000000003, 0xc00ffffffffffffd, 0x800000000000000c);
+ status |= test__muldf3(0x0000000000000003, 0x400ffffffffffffd, 0x000000000000000c);
+ status |= test__muldf3(0x8000000000000003, 0xc00ffffffffffffd, 0x000000000000000c);
+ status |= test__muldf3(0x8000000000000003, 0x400ffffffffffffd, 0x800000000000000c);
+ status |= test__muldf3(0x1e51f703ee090000, 0x1e5c8000e4000000, 0x0000000000000001);
+ status |= test__muldf3(0x1e561ed9745fdb21, 0x1e57255ca25b68e1, 0x0000000000000001);
+ status |= test__muldf3(0x7feffffffff00000, 0xc000000000080000, 0xfff0000000000000);
+
+ // Test that the result of an operation is a NaN at all when it should be.
+ //
+ // In most configurations these tests' results are checked compared using
+ // compareResultD, so we set all the answers to the canonical NaN
+ // 0x7ff8000000000000, which causes compareResultF to accept any NaN
+ // encoding. We also use the same value as the input NaN in tests that have
+ // one, so that even in EXPECT_EXACT_RESULTS mode these tests should pass,
+ // because 0x7ff8000000000000 is still the exact expected NaN.
+ status |= test__muldf3(0x7ff0000000000000, 0x0000000000000000, 0x7ff8000000000000);
+ status |= test__muldf3(0x7ff0000000000000, 0x8000000000000000, 0x7ff8000000000000);
+ status |= test__muldf3(0x8000000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
+ status |= test__muldf3(0x8000000000000000, 0xfff0000000000000, 0x7ff8000000000000);
+ status |= test__muldf3(0x3ff0000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+ status |= test__muldf3(0x7ff8000000000000, 0x3ff0000000000000, 0x7ff8000000000000);
+ status |= test__muldf3(0x7ff8000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+
+#ifdef ARM_NAN_HANDLING
+ // Tests specific to the NaN handling of Arm hardware, mimicked by
+ // arm/muldf3.S:
+ //
+ // - a quiet NaN is distinguished by the top mantissa bit being 1
+ //
+ // - if a signalling NaN appears in the input, the output quiet NaN is
+ // obtained by setting its top mantissa bit and leaving everything else
+ // unchanged
+ //
+ // - if both operands are signalling NaNs then the output NaN is derived
+ // from the first operand
+ //
+ // - if both operands are quiet NaNs then the output NaN is the first
+ // operand
+ //
+ // - invalid operations not involving an input NaN return the quiet
+ // NaN with fewest bits set, 0x7ff8000000000000.
+ status |= test__muldf3(0x0000000000000000, 0x7ff3758244400801, 0x7ffb758244400801);
+ status |= test__muldf3(0x0000000000000000, 0x7fff44d3f65148af, 0x7fff44d3f65148af);
+ status |= test__muldf3(0x0000000000000001, 0x7ff48607b4b37057, 0x7ffc8607b4b37057);
+ status |= test__muldf3(0x0000000000000001, 0x7ff855f2d435b33d, 0x7ff855f2d435b33d);
+ status |= test__muldf3(0x000fffffffffffff, 0x7ff169269a674e13, 0x7ff969269a674e13);
+ status |= test__muldf3(0x000fffffffffffff, 0x7ffc80978b2ef0da, 0x7ffc80978b2ef0da);
+ status |= test__muldf3(0x3ff0000000000000, 0x7ff3458ad034593d, 0x7ffb458ad034593d);
+ status |= test__muldf3(0x3ff0000000000000, 0x7ffdd8bb98c9f13a, 0x7ffdd8bb98c9f13a);
+ status |= test__muldf3(0x7fefffffffffffff, 0x7ff79a8b96250a98, 0x7fff9a8b96250a98);
+ status |= test__muldf3(0x7fefffffffffffff, 0x7ffdcc675b63bb94, 0x7ffdcc675b63bb94);
+ status |= test__muldf3(0x7ff0000000000000, 0x7ff018cfaf4d0fff, 0x7ff818cfaf4d0fff);
+ status |= test__muldf3(0x7ff0000000000000, 0x7ff83ad1ab4dfd24, 0x7ff83ad1ab4dfd24);
+ status |= test__muldf3(0x7ff48ce6c0cdd5ac, 0x0000000000000000, 0x7ffc8ce6c0cdd5ac);
+ status |= test__muldf3(0x7ff08a34f3d5385b, 0x0000000000000001, 0x7ff88a34f3d5385b);
+ status |= test__muldf3(0x7ff0a264c1c96281, 0x000fffffffffffff, 0x7ff8a264c1c96281);
+ status |= test__muldf3(0x7ff77ce629e61f0e, 0x3ff0000000000000, 0x7fff7ce629e61f0e);
+ status |= test__muldf3(0x7ff715e2d147fd76, 0x7fefffffffffffff, 0x7fff15e2d147fd76);
+ status |= test__muldf3(0x7ff689a2031f1781, 0x7ff0000000000000, 0x7ffe89a2031f1781);
+ status |= test__muldf3(0x7ff5dfb4a0c8cd05, 0x7ff11c1fe9793a33, 0x7ffddfb4a0c8cd05);
+ status |= test__muldf3(0x7ff5826283ffb5d7, 0x7fff609b83884e81, 0x7ffd826283ffb5d7);
+ status |= test__muldf3(0x7ff7cb03f2e61d42, 0x8000000000000000, 0x7fffcb03f2e61d42);
+ status |= test__muldf3(0x7ff2adc8dfe72c96, 0x8000000000000001, 0x7ffaadc8dfe72c96);
+ status |= test__muldf3(0x7ff4fc0bacc707f2, 0x800fffffffffffff, 0x7ffcfc0bacc707f2);
+ status |= test__muldf3(0x7ff76248c8c9a619, 0xbff0000000000000, 0x7fff6248c8c9a619);
+ status |= test__muldf3(0x7ff367972fce131b, 0xffefffffffffffff, 0x7ffb67972fce131b);
+ status |= test__muldf3(0x7ff188f5ac284e92, 0xfff0000000000000, 0x7ff988f5ac284e92);
+ status |= test__muldf3(0x7ffed4c22e4e569d, 0x0000000000000000, 0x7ffed4c22e4e569d);
+ status |= test__muldf3(0x7ffe95105fa3f339, 0x0000000000000001, 0x7ffe95105fa3f339);
+ status |= test__muldf3(0x7ffb8d33dbb9ecfb, 0x000fffffffffffff, 0x7ffb8d33dbb9ecfb);
+ status |= test__muldf3(0x7ff874e41dc63e07, 0x3ff0000000000000, 0x7ff874e41dc63e07);
+ status |= test__muldf3(0x7ffe27594515ecdf, 0x7fefffffffffffff, 0x7ffe27594515ecdf);
+ status |= test__muldf3(0x7ffeac86d5c69bdf, 0x7ff0000000000000, 0x7ffeac86d5c69bdf);
+ status |= test__muldf3(0x7ff97d657b99f76f, 0x7ff7e4149862a796, 0x7fffe4149862a796);
+ status |= test__muldf3(0x7ffad17c6aa33fad, 0x7ffd898893ad4d28, 0x7ffad17c6aa33fad);
+ status |= test__muldf3(0x7ff96e04e9c3d173, 0x8000000000000000, 0x7ff96e04e9c3d173);
+ status |= test__muldf3(0x7ffec01ad8da3abb, 0x8000000000000001, 0x7ffec01ad8da3abb);
+ status |= test__muldf3(0x7ffd1d565c495941, 0x800fffffffffffff, 0x7ffd1d565c495941);
+ status |= test__muldf3(0x7ffe3d24f1e474a7, 0xbff0000000000000, 0x7ffe3d24f1e474a7);
+ status |= test__muldf3(0x7ffc206f2bb8c8ce, 0xffefffffffffffff, 0x7ffc206f2bb8c8ce);
+ status |= test__muldf3(0x7ff93efdecfb7d3b, 0xfff0000000000000, 0x7ff93efdecfb7d3b);
+ status |= test__muldf3(0x8000000000000000, 0x7ff2ee725d143ac5, 0x7ffaee725d143ac5);
+ status |= test__muldf3(0x8000000000000000, 0x7ffbba26e5c5fe98, 0x7ffbba26e5c5fe98);
+ status |= test__muldf3(0x8000000000000001, 0x7ff7818a1cd26df9, 0x7fff818a1cd26df9);
+ status |= test__muldf3(0x8000000000000001, 0x7ffaee6cc63b5292, 0x7ffaee6cc63b5292);
+ status |= test__muldf3(0x800fffffffffffff, 0x7ff401096edaf79d, 0x7ffc01096edaf79d);
+ status |= test__muldf3(0x800fffffffffffff, 0x7ffbf1778c7a2e59, 0x7ffbf1778c7a2e59);
+ status |= test__muldf3(0xbff0000000000000, 0x7ff2e8fb0201c496, 0x7ffae8fb0201c496);
+ status |= test__muldf3(0xbff0000000000000, 0x7ffcb6a5adb2e154, 0x7ffcb6a5adb2e154);
+ status |= test__muldf3(0xffefffffffffffff, 0x7ff1ea1bfc15d71d, 0x7ff9ea1bfc15d71d);
+ status |= test__muldf3(0xffefffffffffffff, 0x7ffae0766e21efc0, 0x7ffae0766e21efc0);
+ status |= test__muldf3(0xfff0000000000000, 0x7ff3b364cffbdfe6, 0x7ffbb364cffbdfe6);
+ status |= test__muldf3(0xfff0000000000000, 0x7ffd0d3223334ae3, 0x7ffd0d3223334ae3);
+
+#endif // ARM_NAN_HANDLING
+
+ return status;
+}
>From 9b5d3184fbbb66eb2934a02c164f36bc3c2540fe Mon Sep 17 00:00:00 2001
From: Simon Tatham <simon.tatham at arm.com>
Date: Thu, 5 Feb 2026 17:19:47 +0000
Subject: [PATCH 2/3] clang-format
---
.../test/builtins/Unit/divdf3new_test.c | 1179 +++++++++++------
.../test/builtins/Unit/muldf3new_test.c | 1134 ++++++++++------
2 files changed, 1540 insertions(+), 773 deletions(-)
diff --git a/compiler-rt/test/builtins/Unit/divdf3new_test.c b/compiler-rt/test/builtins/Unit/divdf3new_test.c
index b756acf2dfeb0..ca33e00a8741d 100644
--- a/compiler-rt/test/builtins/Unit/divdf3new_test.c
+++ b/compiler-rt/test/builtins/Unit/divdf3new_test.c
@@ -24,7 +24,8 @@
// Returns: a / b
COMPILER_RT_ABI double __divdf3(double a, double b);
-int test__divdf3(int line, uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep) {
+int test__divdf3(int line, uint64_t a_rep, uint64_t b_rep,
+ uint64_t expected_rep) {
double a = fromRep64(a_rep), b = fromRep64(b_rep);
double x = __divdf3(a, b);
#ifdef EXPECT_EXACT_RESULTS
@@ -34,345 +35,672 @@ int test__divdf3(int line, uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep
#endif
if (ret) {
- printf("error at line %d: __divdf3(%016" PRIx64 ", %016" PRIx64 ") = %016" PRIx64
- ", expected %016" PRIx64 "\n",
+ printf("error at line %d: __divdf3(%016" PRIx64 ", %016" PRIx64
+ ") = %016" PRIx64 ", expected %016" PRIx64 "\n",
line, a_rep, b_rep, toRep64(x), expected_rep);
}
return ret;
}
-#define test__divdf3(a,b,x) test__divdf3(__LINE__,a,b,x)
+#define test__divdf3(a, b, x) test__divdf3(__LINE__, a, b, x)
int main(void) {
int status = 0;
- status |= test__divdf3(0x0000000000000000, 0x0000000000000001, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x000fffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x0010000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x001fffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x3ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x4014000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x7fdfffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x7fe0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x8000000000000002, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x800fffffffffffff, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x8010000000000001, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0x8020000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0xc008000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0xc01c000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0xffcfffffffffffff, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0xffe0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000000, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000001, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x0000000000000001, 0x3fc0000000000000, 0x0000000000000008);
- status |= test__divdf3(0x0000000000000001, 0x3fe0000000000000, 0x0000000000000002);
- status |= test__divdf3(0x0000000000000001, 0x4000000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000001, 0x7fefffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000001, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0000000000000001, 0xc000000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000001, 0xffefffffffffffff, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000002, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x0000000000000002, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0000000000000009, 0x4022000000000000, 0x0000000000000001);
- status |= test__divdf3(0x0000000000000009, 0xc022000000000000, 0x8000000000000001);
- status |= test__divdf3(0x000ffffffffffff7, 0x3feffffffffffffe, 0x000ffffffffffff8);
- status |= test__divdf3(0x000ffffffffffffe, 0x3feffffffffffffe, 0x000fffffffffffff);
- status |= test__divdf3(0x000fffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x000fffffffffffff, 0x3f60000000000000, 0x009ffffffffffffe);
- status |= test__divdf3(0x000fffffffffffff, 0x3fe0000000000000, 0x001ffffffffffffe);
- status |= test__divdf3(0x000fffffffffffff, 0x3ff0000000000000, 0x000fffffffffffff);
- status |= test__divdf3(0x000fffffffffffff, 0x3ff0000000000002, 0x000ffffffffffffd);
- status |= test__divdf3(0x000fffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x000fffffffffffff, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x000fffffffffffff, 0xbff0000000000000, 0x800fffffffffffff);
- status |= test__divdf3(0x000fffffffffffff, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0010000000000000, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x0010000000000000, 0x3ff0000000000001, 0x000fffffffffffff);
- status |= test__divdf3(0x0010000000000000, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0010000000000001, 0x3ff0000000000002, 0x000fffffffffffff);
- status |= test__divdf3(0x0010000000000001, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x0010000000000001, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0010000000000002, 0x3ff0000000000006, 0x000ffffffffffffc);
- status |= test__divdf3(0x001ffffffffffffe, 0x4000000000000000, 0x000fffffffffffff);
- status |= test__divdf3(0x001fffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x001fffffffffffff, 0x4000000000000000, 0x0010000000000000);
- status |= test__divdf3(0x001fffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x0020000000000000, 0x0010000000000000, 0x4000000000000000);
- status |= test__divdf3(0x0020000000000000, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x0020000000000000, 0xc000000000000000, 0x8010000000000000);
- status |= test__divdf3(0x0020000000000000, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x0020000000000001, 0x0010000000000001, 0x4000000000000000);
- status |= test__divdf3(0x0020000000000001, 0xc000000000000000, 0x8010000000000001);
- status |= test__divdf3(0x0020000000000003, 0x8010000000000003, 0xc000000000000000);
- status |= test__divdf3(0x0020000000000003, 0xc000000000000000, 0x8010000000000003);
- status |= test__divdf3(0x3feffffffffffff7, 0x3feffffffffffffb, 0x3feffffffffffffc);
- status |= test__divdf3(0x3feffffffffffff7, 0x3feffffffffffffe, 0x3feffffffffffff9);
- status |= test__divdf3(0x3feffffffffffff8, 0x3feffffffffffffc, 0x3feffffffffffffc);
- status |= test__divdf3(0x3feffffffffffff8, 0x3feffffffffffffd, 0x3feffffffffffffb);
- status |= test__divdf3(0x3feffffffffffffa, 0x3feffffffffffff9, 0x3ff0000000000001);
- status |= test__divdf3(0x3feffffffffffffb, 0x3feffffffffffff9, 0x3ff0000000000001);
- status |= test__divdf3(0x3feffffffffffffc, 0x3feffffffffffff9, 0x3ff0000000000002);
- status |= test__divdf3(0x3feffffffffffffc, 0x3feffffffffffffd, 0x3fefffffffffffff);
- status |= test__divdf3(0x3feffffffffffffc, 0x3feffffffffffffe, 0x3feffffffffffffe);
- status |= test__divdf3(0x3feffffffffffffc, 0x3fefffffffffffff, 0x3feffffffffffffd);
- status |= test__divdf3(0x3feffffffffffffc, 0x3ff0000000000001, 0x3feffffffffffffa);
- status |= test__divdf3(0x3feffffffffffffd, 0x3feffffffffffff9, 0x3ff0000000000002);
- status |= test__divdf3(0x3feffffffffffffd, 0x3feffffffffffffc, 0x3ff0000000000001);
- status |= test__divdf3(0x3feffffffffffffd, 0x3feffffffffffffe, 0x3fefffffffffffff);
- status |= test__divdf3(0x3feffffffffffffd, 0x3fefffffffffffff, 0x3feffffffffffffe);
- status |= test__divdf3(0x3feffffffffffffd, 0x3ff0000000000001, 0x3feffffffffffffb);
- status |= test__divdf3(0x3feffffffffffffd, 0x3ff0000000000002, 0x3feffffffffffff9);
- status |= test__divdf3(0x3feffffffffffffe, 0x3feffffffffffff9, 0x3ff0000000000003);
- status |= test__divdf3(0x3feffffffffffffe, 0x3feffffffffffffc, 0x3ff0000000000001);
- status |= test__divdf3(0x3feffffffffffffe, 0x3feffffffffffffd, 0x3ff0000000000001);
- status |= test__divdf3(0x3feffffffffffffe, 0x3fefffffffffffff, 0x3fefffffffffffff);
- status |= test__divdf3(0x3feffffffffffffe, 0x3ff0000000000001, 0x3feffffffffffffc);
- status |= test__divdf3(0x3feffffffffffffe, 0x3ff0000000000002, 0x3feffffffffffffa);
- status |= test__divdf3(0x3feffffffffffffe, 0x3ff0000000000003, 0x3feffffffffffff8);
- status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffff9, 0x3ff0000000000003);
- status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffc, 0x3ff0000000000002);
- status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffd, 0x3ff0000000000001);
- status |= test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffe, 0x3ff0000000000001);
- status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000001, 0x3feffffffffffffd);
- status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000002, 0x3feffffffffffffb);
- status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000003, 0x3feffffffffffff9);
- status |= test__divdf3(0x3fefffffffffffff, 0x3ff0000000000004, 0x3feffffffffffff7);
- status |= test__divdf3(0x3ff0000000000000, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffff7, 0x3ff0000000000005);
- status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffff8, 0x3ff0000000000004);
- status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffb, 0x3ff0000000000003);
- status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffc, 0x3ff0000000000002);
- status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffd, 0x3ff0000000000002);
- status |= test__divdf3(0x3ff0000000000000, 0x3feffffffffffffe, 0x3ff0000000000001);
- status |= test__divdf3(0x3ff0000000000000, 0x3fefffffffffffff, 0x3ff0000000000001);
- status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000);
- status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000001, 0x3feffffffffffffe);
- status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000002, 0x3feffffffffffffc);
- status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000003, 0x3feffffffffffffa);
- status |= test__divdf3(0x3ff0000000000000, 0x3ff0000000000004, 0x3feffffffffffff8);
- status |= test__divdf3(0x3ff0000000000000, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x3ff0000000000001, 0x3feffffffffffffb, 0x3ff0000000000004);
- status |= test__divdf3(0x3ff0000000000001, 0x3feffffffffffffd, 0x3ff0000000000003);
- status |= test__divdf3(0x3ff0000000000001, 0x3feffffffffffffe, 0x3ff0000000000002);
- status |= test__divdf3(0x3ff0000000000001, 0x3fefffffffffffff, 0x3ff0000000000002);
- status |= test__divdf3(0x3ff0000000000001, 0x3ff0000000000002, 0x3feffffffffffffe);
- status |= test__divdf3(0x3ff0000000000001, 0x3ff0000000000003, 0x3feffffffffffffc);
- status |= test__divdf3(0x3ff0000000000002, 0x3feffffffffffffc, 0x3ff0000000000004);
- status |= test__divdf3(0x3ff0000000000002, 0x3feffffffffffffd, 0x3ff0000000000004);
- status |= test__divdf3(0x3ff0000000000002, 0x3feffffffffffffe, 0x3ff0000000000003);
- status |= test__divdf3(0x3ff0000000000002, 0x3fefffffffffffff, 0x3ff0000000000003);
- status |= test__divdf3(0x3ff0000000000002, 0x3ff0000000000001, 0x3ff0000000000001);
- status |= test__divdf3(0x3ff0000000000002, 0x3ff0000000000003, 0x3feffffffffffffe);
- status |= test__divdf3(0x3ff0000000000003, 0x3feffffffffffffd, 0x3ff0000000000005);
- status |= test__divdf3(0x3ff0000000000003, 0x3feffffffffffffe, 0x3ff0000000000004);
- status |= test__divdf3(0x3ff0000000000003, 0x3fefffffffffffff, 0x3ff0000000000004);
- status |= test__divdf3(0x3ff0000000000003, 0x3ff0000000000001, 0x3ff0000000000002);
- status |= test__divdf3(0x3ff0000000000004, 0x3feffffffffffffe, 0x3ff0000000000005);
- status |= test__divdf3(0x3ff0000000000004, 0x3ff0000000000001, 0x3ff0000000000003);
- status |= test__divdf3(0x3ff0000000000004, 0x3ff0000000000007, 0x3feffffffffffffa);
- status |= test__divdf3(0x3ff0000000000005, 0x3fefffffffffffff, 0x3ff0000000000006);
- status |= test__divdf3(0x3ff0000000000006, 0x3ff0000000000008, 0x3feffffffffffffc);
- status |= test__divdf3(0x3ff0000000000007, 0x3ff0000000000002, 0x3ff0000000000005);
- status |= test__divdf3(0x3ff0000000000009, 0x3ff0000000000008, 0x3ff0000000000001);
- status |= test__divdf3(0x3ff199999999999a, 0x3ff3333333333333, 0x3fed555555555556);
- status |= test__divdf3(0x4000000000000000, 0x3ff0000000000000, 0x4000000000000000);
- status |= test__divdf3(0x4000000000000000, 0xbff0000000000000, 0xc000000000000000);
- status |= test__divdf3(0x4008000000000000, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x4008000000000000, 0xc008000000000000, 0xbff0000000000000);
- status |= test__divdf3(0x4008000000000000, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x4014000000000000, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x4014000000000000, 0x4014000000000000, 0x3ff0000000000000);
- status |= test__divdf3(0x4014000000000000, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x401c000000000000, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x401c000000000000, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x4020000000000000, 0x4000000000000000, 0x4010000000000000);
- status |= test__divdf3(0x4022000000000000, 0x4008000000000000, 0x4008000000000000);
- status |= test__divdf3(0x7f60000000000000, 0x00a0000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7fcfffffffffffff, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7fdffffffffffffd, 0xc000000000000000, 0xffcffffffffffffd);
- status |= test__divdf3(0x7fdfffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7fdfffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0x3fe0000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0x4000000000000000, 0x7fd0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0x7ff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0xbfe0000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0xc000000000000000, 0xffd0000000000000);
- status |= test__divdf3(0x7fe0000000000000, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x7fe0000000000003, 0xffd0000000000003, 0xc000000000000000);
- status |= test__divdf3(0x7feffffffffffffd, 0x4010000000000000, 0x7fcffffffffffffd);
- status |= test__divdf3(0x7feffffffffffffd, 0xc010000000000000, 0xffcffffffffffffd);
- status |= test__divdf3(0x7fefffffffffffff, 0x0000000000000001, 0x7ff0000000000000);
- status |= test__divdf3(0x7fefffffffffffff, 0x3fefffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0x7fefffffffffffff, 0x7fcfffffffffffff, 0x4010000000000000);
- status |= test__divdf3(0x7fefffffffffffff, 0x7fdfffffffffffff, 0x4000000000000000);
- status |= test__divdf3(0x7fefffffffffffff, 0xc000000000000000, 0xffdfffffffffffff);
- status |= test__divdf3(0x7fefffffffffffff, 0xffcfffffffffffff, 0xc010000000000000);
- status |= test__divdf3(0x7fefffffffffffff, 0xfff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x0000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x0000000000000001, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x0010000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x001fffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x3ff0000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x4014000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x7fdfffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x7fe0000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x8000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x8000000000000002, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x800fffffffffffff, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x8010000000000001, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x8020000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0xc008000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0xc01c000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0xffcfffffffffffff, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0xffe0000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0xffefffffffffffff, 0xfff0000000000000);
- status |= test__divdf3(0x8000000000000000, 0x0000000000000003, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x000fffffffffffff, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x0010000000000001, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x0020000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x4000000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x4018000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x7fcfffffffffffff, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x7fd0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x8000000000000004, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x800fffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x8010000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0x801fffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0xc010000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0xc020000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0xffd0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0xffdfffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000000, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000001, 0x3fe0000000000000, 0x8000000000000002);
- status |= test__divdf3(0x8000000000000001, 0x4000000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000001, 0x7fefffffffffffff, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000001, 0xc000000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000001, 0xffefffffffffffff, 0x0000000000000000);
- status |= test__divdf3(0x8000000000000003, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x8000000000000003, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8000000000000004, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x8000000000000004, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x800ffffffffffff8, 0x3feffffffffffffe, 0x800ffffffffffff9);
- status |= test__divdf3(0x800fffffffffffff, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x800fffffffffffff, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x800fffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x800fffffffffffff, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8010000000000000, 0x3ff0000000000001, 0x800fffffffffffff);
- status |= test__divdf3(0x8010000000000000, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x8010000000000000, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8010000000000001, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x8010000000000001, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x801fffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0x801fffffffffffff, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0x8020000000000000, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0x8020000000000000, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0x8020000000000001, 0x0010000000000001, 0xc000000000000000);
- status |= test__divdf3(0x8020000000000005, 0x0010000000000005, 0xc000000000000000);
- status |= test__divdf3(0xbff0000000000000, 0x3ff0000000000000, 0xbff0000000000000);
- status |= test__divdf3(0xbff0000000000000, 0xbff0000000000000, 0x3ff0000000000000);
- status |= test__divdf3(0xc000000000000000, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xc000000000000000, 0x3ff0000000000000, 0xc000000000000000);
- status |= test__divdf3(0xc000000000000000, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0xc000000000000000, 0xbff0000000000000, 0x4000000000000000);
- status |= test__divdf3(0xc010000000000000, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xc010000000000000, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0xc018000000000000, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xc018000000000000, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0xc018000000000000, 0xc008000000000000, 0x4000000000000000);
- status |= test__divdf3(0xc01c000000000000, 0x401c000000000000, 0xbff0000000000000);
- status |= test__divdf3(0xc020000000000000, 0x4000000000000000, 0xc010000000000000);
- status |= test__divdf3(0xc020000000000000, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xc020000000000000, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0xc022000000000000, 0xc008000000000000, 0x4008000000000000);
- status |= test__divdf3(0xffcfffffffffffff, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xffcfffffffffffff, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0xffd0000000000000, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xffd0000000000000, 0x7ff0000000000000, 0x8000000000000000);
- status |= test__divdf3(0xffd0000000000000, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xffd0000000000000, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0xffdfffffffffffff, 0x4000000000000000, 0xffcfffffffffffff);
- status |= test__divdf3(0xffdfffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xffe0000000000000, 0x3fe0000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xffe0000000000000, 0xbfe0000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xffe0000000000001, 0x7fd0000000000001, 0xc000000000000000);
- status |= test__divdf3(0xffeffffffffffffd, 0x4010000000000000, 0xffcffffffffffffd);
- status |= test__divdf3(0xffeffffffffffffd, 0xc010000000000000, 0x7fcffffffffffffd);
- status |= test__divdf3(0xffefffffffffffff, 0x7fcfffffffffffff, 0xc010000000000000);
- status |= test__divdf3(0xffefffffffffffff, 0xffcfffffffffffff, 0x4010000000000000);
- status |= test__divdf3(0xffefffffffffffff, 0xfff0000000000000, 0x0000000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x0000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x0000000000000003, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x000fffffffffffff, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x0010000000000001, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x0020000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x4000000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x4018000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x7fd0000000000000, 0xfff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x8000000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x8000000000000004, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x800fffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x8010000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x801fffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0xc010000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0xc020000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0xffd0000000000000, 0x7ff0000000000000);
- status |= test__divdf3(0xfff0000000000000, 0xffefffffffffffff, 0x7ff0000000000000);
- status |= test__divdf3(0x800ffffffdffffff, 0xc00fff8000000000, 0x0004000fffbfff00);
- status |= test__divdf3(0xb7fbffffffffffff, 0xffe0000000000007, 0x0000000000000000);
- status |= test__divdf3(0x3ff660beb3029ffd, 0x3ff52e22fb7ace43, 0x3ff0e79e59ccb735);
- status |= test__divdf3(0x3ff73ddbc621eb00, 0x3ffb8224c030d747, 0x3feb095d4073d13b);
- status |= test__divdf3(0x3ff9a3b1ff2bf973, 0x3ff42fdf35d2d3bd, 0x3ff452508f203fca);
- status |= test__divdf3(0x3ffa2f42f2a01655, 0x3ff01310ba9f33d1, 0x3ffa103474220298);
- status |= test__divdf3(0x3ffa6b3e65d68478, 0x3ff773ca580800a9, 0x3ff206204bf651cc);
- status |= test__divdf3(0x3ffae840ed05aaad, 0x3ff374c8afa6bd73, 0x3ff620a0b38357dd);
- status |= test__divdf3(0x3ffc9bff90e124f7, 0x3ff19678d03f31b9, 0x3ffa06ce5731c244);
- status |= test__divdf3(0x3ff716518068f63e, 0x3ffea080001fffff, 0x3fe81f4927e2f813);
- status |= test__divdf3(0x3ff30b70c9e177b3, 0x3ffdc1dbcddeaaf7, 0x3fe47ae453d79b63);
- status |= test__divdf3(0x3ff690a0c1cf289e, 0x3ffdd0e4ec596ead, 0x3fe837c35c721292);
- status |= test__divdf3(0x3ff9a9f18698d1c5, 0x3ffdcf214b672807, 0x3feb8cd196d1e2db);
- status |= test__divdf3(0x3ffc412def95e9f2, 0x3ffe09fd73e44afb, 0x3fee195e4c411819);
- status |= test__divdf3(0x3ffab674f26df917, 0x3ffe55a80dfd623d, 0x3fec2de561fb628a);
- status |= test__divdf3(0x3ff15bb10851a33b, 0x3ffe770229894d4f, 0x3fe23b9bdf3ad4d7);
- status |= test__divdf3(0x3ff6ce035de00c24, 0x3fff04076d288c95, 0x3fe7874738e5ef5e);
- status |= test__divdf3(0x3ffb0e73f83fd2b4, 0x3fff01150ca4f6e3, 0x3febece97e64ff65);
- status |= test__divdf3(0x3ff53fff6c6d7043, 0x3fffb55c0bf15be1, 0x3fe57204f8441410);
- status |= test__divdf3(0x3ffa8aa3bbff7c4b, 0x3fffd530fa74cc5f, 0x3feaae55281a47cf);
- status |= test__divdf3(0x3ff3004b0d901379, 0x3ffe470662686931, 0x3fe41508eef9d818);
- status |= test__divdf3(0x3ffac10f29e80b25, 0x3ffe2fba9d423c9d, 0x3fec5c8a8148eb26);
- status |= test__divdf3(0x3ff8a3e14fe0651f, 0x3ffdeeae50e07679, 0x3fea579ce7a3f61c);
- status |= test__divdf3(0x3ff168321760dd0d, 0x3ffd382a2b3c2c27, 0x3fe31042c5fcbe35);
- status |= test__divdf3(0x3ff208350f930e99, 0x3ffc80beeab6d9ed, 0x3fe43e9486314a0e);
- status |= test__divdf3(0x3ff46a9470b46af6, 0x3ffc2e13c9335b3f, 0x3fe72f150e86f5a1);
- status |= test__divdf3(0x3ffaf26f45d21562, 0x3ffbe6d631b290e7, 0x3feee7b30b353e95);
- status |= test__divdf3(0x3ff5cda6f52381df, 0x3ffbe2a5bce4483f, 0x3fe90542a0e62c21);
- status |= test__divdf3(0x3ff92aeb8209bb69, 0x3ffb57a0bdf7af6f, 0x3fed74754022b839);
- status |= test__divdf3(0x3ff627c9c1a1903d, 0x3ffb3c161457a7e1, 0x3fea082feee891f0);
- status |= test__divdf3(0x3ffa5fef91208fd5, 0x3ff68928392cf5e7, 0x3ff2b9c16cd0a6eb);
- status |= test__divdf3(0x3ffdc6825d6a2ad2, 0x3ff69bb9ca89cd3f, 0x3ff5127c1399515f);
- status |= test__divdf3(0x3ffd62dbb1150699, 0x3ff6e12d3daf7823, 0x3ff48cd52e787bc5);
- status |= test__divdf3(0x3ffb9f0e3f946dd2, 0x3ff75a51f01f688b, 0x3ff2ecadebdfdf91);
- status |= test__divdf3(0x3ffdf21fc13ef609, 0x3ff77a80c8098ae1, 0x3ff46843217c9c90);
- status |= test__divdf3(0x3ff83f6d28924d31, 0x3ff7cb607bcc758f, 0x3ff04e08e26c84b7);
- status |= test__divdf3(0x3ffef8774307cea5, 0x3ff849124d13461d, 0x3ff467851369d61a);
- status |= test__divdf3(0x3ffd7c2259068fa2, 0x3ffa9e9faf8d6845, 0x3ff1b8e24ddeb546);
- status |= test__divdf3(0x3fffb10b35d3977b, 0x3ffb57a0bdf7af6f, 0x3ff28b8abfdd47c7);
- status |= test__divdf3(0x3ffdcfa4097387f1, 0x3ffbe6d631b290e7, 0x3ff1184cf4cac16b);
- status |= test__divdf3(0x3ffcb6231a615d02, 0x3ffb98faef6f9417, 0x3ff0a552a67a8e2d);
- status |= test__divdf3(0x3ffba5443a5d0a42, 0x3ffb3a5c10922a9d, 0x3ff03ed2622d2a26);
- status |= test__divdf3(0x3fff3144ae86b33e, 0x3ffa58948417f235, 0x3ff2f17912d557f2);
- status |= test__divdf3(0x3ffd68635bf6605a, 0x3ff945fce3a79f3f, 0x3ff29e0c7d6617a1);
- status |= test__divdf3(0x3ff97e6030354676, 0x3ff906f78f460697, 0x3ff04c56a5f3136d);
- status |= test__divdf3(0x3ffe86f743594e95, 0x3ff8444d7946422d, 0x3ff420b1e63f512e);
- status |= test__divdf3(0x3fff12a6c5539a9a, 0x3ff7cad48079af09, 0x3ff4e564f736b864);
- status |= test__divdf3(0x3ffa5371fe989251, 0x3ff6fc5272dc36d1, 0x3ff2533d7a4d0ee8);
- status |= test__divdf3(0x3ffe18c0547f65d2, 0x3ff6fc9e8dd915ed, 0x3ff4f2e7f917b80e);
- status |= test__divdf3(0x3ffd7aea8a297055, 0x3ff64eb95d608cd9, 0x3ff52500dc28664c);
+ status |=
+ test__divdf3(0x0000000000000000, 0x0000000000000001, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x000fffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x0010000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x001fffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x3ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x4014000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x7fdfffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x7fe0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x8000000000000002, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x800fffffffffffff, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x8010000000000001, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x8020000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0xc008000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0xc01c000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0xffcfffffffffffff, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0xffe0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000001, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x0000000000000001, 0x3fc0000000000000, 0x0000000000000008);
+ status |=
+ test__divdf3(0x0000000000000001, 0x3fe0000000000000, 0x0000000000000002);
+ status |=
+ test__divdf3(0x0000000000000001, 0x4000000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000001, 0x7fefffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000001, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0000000000000001, 0xc000000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000001, 0xffefffffffffffff, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000002, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x0000000000000002, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0000000000000009, 0x4022000000000000, 0x0000000000000001);
+ status |=
+ test__divdf3(0x0000000000000009, 0xc022000000000000, 0x8000000000000001);
+ status |=
+ test__divdf3(0x000ffffffffffff7, 0x3feffffffffffffe, 0x000ffffffffffff8);
+ status |=
+ test__divdf3(0x000ffffffffffffe, 0x3feffffffffffffe, 0x000fffffffffffff);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x3f60000000000000, 0x009ffffffffffffe);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x3fe0000000000000, 0x001ffffffffffffe);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x3ff0000000000000, 0x000fffffffffffff);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x3ff0000000000002, 0x000ffffffffffffd);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0xbff0000000000000, 0x800fffffffffffff);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0010000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x0010000000000000, 0x3ff0000000000001, 0x000fffffffffffff);
+ status |=
+ test__divdf3(0x0010000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0010000000000001, 0x3ff0000000000002, 0x000fffffffffffff);
+ status |=
+ test__divdf3(0x0010000000000001, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x0010000000000001, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0010000000000002, 0x3ff0000000000006, 0x000ffffffffffffc);
+ status |=
+ test__divdf3(0x001ffffffffffffe, 0x4000000000000000, 0x000fffffffffffff);
+ status |=
+ test__divdf3(0x001fffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x001fffffffffffff, 0x4000000000000000, 0x0010000000000000);
+ status |=
+ test__divdf3(0x001fffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x0020000000000000, 0x0010000000000000, 0x4000000000000000);
+ status |=
+ test__divdf3(0x0020000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x0020000000000000, 0xc000000000000000, 0x8010000000000000);
+ status |=
+ test__divdf3(0x0020000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x0020000000000001, 0x0010000000000001, 0x4000000000000000);
+ status |=
+ test__divdf3(0x0020000000000001, 0xc000000000000000, 0x8010000000000001);
+ status |=
+ test__divdf3(0x0020000000000003, 0x8010000000000003, 0xc000000000000000);
+ status |=
+ test__divdf3(0x0020000000000003, 0xc000000000000000, 0x8010000000000003);
+ status |=
+ test__divdf3(0x3feffffffffffff7, 0x3feffffffffffffb, 0x3feffffffffffffc);
+ status |=
+ test__divdf3(0x3feffffffffffff7, 0x3feffffffffffffe, 0x3feffffffffffff9);
+ status |=
+ test__divdf3(0x3feffffffffffff8, 0x3feffffffffffffc, 0x3feffffffffffffc);
+ status |=
+ test__divdf3(0x3feffffffffffff8, 0x3feffffffffffffd, 0x3feffffffffffffb);
+ status |=
+ test__divdf3(0x3feffffffffffffa, 0x3feffffffffffff9, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3feffffffffffffb, 0x3feffffffffffff9, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3feffffffffffffc, 0x3feffffffffffff9, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3feffffffffffffc, 0x3feffffffffffffd, 0x3fefffffffffffff);
+ status |=
+ test__divdf3(0x3feffffffffffffc, 0x3feffffffffffffe, 0x3feffffffffffffe);
+ status |=
+ test__divdf3(0x3feffffffffffffc, 0x3fefffffffffffff, 0x3feffffffffffffd);
+ status |=
+ test__divdf3(0x3feffffffffffffc, 0x3ff0000000000001, 0x3feffffffffffffa);
+ status |=
+ test__divdf3(0x3feffffffffffffd, 0x3feffffffffffff9, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3feffffffffffffd, 0x3feffffffffffffc, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3feffffffffffffd, 0x3feffffffffffffe, 0x3fefffffffffffff);
+ status |=
+ test__divdf3(0x3feffffffffffffd, 0x3fefffffffffffff, 0x3feffffffffffffe);
+ status |=
+ test__divdf3(0x3feffffffffffffd, 0x3ff0000000000001, 0x3feffffffffffffb);
+ status |=
+ test__divdf3(0x3feffffffffffffd, 0x3ff0000000000002, 0x3feffffffffffff9);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3feffffffffffff9, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3feffffffffffffc, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3feffffffffffffd, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3fefffffffffffff, 0x3fefffffffffffff);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3ff0000000000001, 0x3feffffffffffffc);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3ff0000000000002, 0x3feffffffffffffa);
+ status |=
+ test__divdf3(0x3feffffffffffffe, 0x3ff0000000000003, 0x3feffffffffffff8);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3feffffffffffff9, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffc, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffd, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3feffffffffffffe, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3ff0000000000001, 0x3feffffffffffffd);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3ff0000000000002, 0x3feffffffffffffb);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3ff0000000000003, 0x3feffffffffffff9);
+ status |=
+ test__divdf3(0x3fefffffffffffff, 0x3ff0000000000004, 0x3feffffffffffff7);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3feffffffffffff7, 0x3ff0000000000005);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3feffffffffffff8, 0x3ff0000000000004);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3feffffffffffffb, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3feffffffffffffc, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3feffffffffffffd, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3feffffffffffffe, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3fefffffffffffff, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3ff0000000000001, 0x3feffffffffffffe);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3ff0000000000002, 0x3feffffffffffffc);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3ff0000000000003, 0x3feffffffffffffa);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x3ff0000000000004, 0x3feffffffffffff8);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x3ff0000000000001, 0x3feffffffffffffb, 0x3ff0000000000004);
+ status |=
+ test__divdf3(0x3ff0000000000001, 0x3feffffffffffffd, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3ff0000000000001, 0x3feffffffffffffe, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3ff0000000000001, 0x3fefffffffffffff, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3ff0000000000001, 0x3ff0000000000002, 0x3feffffffffffffe);
+ status |=
+ test__divdf3(0x3ff0000000000001, 0x3ff0000000000003, 0x3feffffffffffffc);
+ status |=
+ test__divdf3(0x3ff0000000000002, 0x3feffffffffffffc, 0x3ff0000000000004);
+ status |=
+ test__divdf3(0x3ff0000000000002, 0x3feffffffffffffd, 0x3ff0000000000004);
+ status |=
+ test__divdf3(0x3ff0000000000002, 0x3feffffffffffffe, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3ff0000000000002, 0x3fefffffffffffff, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3ff0000000000002, 0x3ff0000000000001, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3ff0000000000002, 0x3ff0000000000003, 0x3feffffffffffffe);
+ status |=
+ test__divdf3(0x3ff0000000000003, 0x3feffffffffffffd, 0x3ff0000000000005);
+ status |=
+ test__divdf3(0x3ff0000000000003, 0x3feffffffffffffe, 0x3ff0000000000004);
+ status |=
+ test__divdf3(0x3ff0000000000003, 0x3fefffffffffffff, 0x3ff0000000000004);
+ status |=
+ test__divdf3(0x3ff0000000000003, 0x3ff0000000000001, 0x3ff0000000000002);
+ status |=
+ test__divdf3(0x3ff0000000000004, 0x3feffffffffffffe, 0x3ff0000000000005);
+ status |=
+ test__divdf3(0x3ff0000000000004, 0x3ff0000000000001, 0x3ff0000000000003);
+ status |=
+ test__divdf3(0x3ff0000000000004, 0x3ff0000000000007, 0x3feffffffffffffa);
+ status |=
+ test__divdf3(0x3ff0000000000005, 0x3fefffffffffffff, 0x3ff0000000000006);
+ status |=
+ test__divdf3(0x3ff0000000000006, 0x3ff0000000000008, 0x3feffffffffffffc);
+ status |=
+ test__divdf3(0x3ff0000000000007, 0x3ff0000000000002, 0x3ff0000000000005);
+ status |=
+ test__divdf3(0x3ff0000000000009, 0x3ff0000000000008, 0x3ff0000000000001);
+ status |=
+ test__divdf3(0x3ff199999999999a, 0x3ff3333333333333, 0x3fed555555555556);
+ status |=
+ test__divdf3(0x4000000000000000, 0x3ff0000000000000, 0x4000000000000000);
+ status |=
+ test__divdf3(0x4000000000000000, 0xbff0000000000000, 0xc000000000000000);
+ status |=
+ test__divdf3(0x4008000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x4008000000000000, 0xc008000000000000, 0xbff0000000000000);
+ status |=
+ test__divdf3(0x4008000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x4014000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x4014000000000000, 0x4014000000000000, 0x3ff0000000000000);
+ status |=
+ test__divdf3(0x4014000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x401c000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x401c000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x4020000000000000, 0x4000000000000000, 0x4010000000000000);
+ status |=
+ test__divdf3(0x4022000000000000, 0x4008000000000000, 0x4008000000000000);
+ status |=
+ test__divdf3(0x7f60000000000000, 0x00a0000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fcfffffffffffff, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7fdffffffffffffd, 0xc000000000000000, 0xffcffffffffffffd);
+ status |=
+ test__divdf3(0x7fdfffffffffffff, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fdfffffffffffff, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0x3fe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0x4000000000000000, 0x7fd0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0x7ff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0xbfe0000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0xc000000000000000, 0xffd0000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000000, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x7fe0000000000003, 0xffd0000000000003, 0xc000000000000000);
+ status |=
+ test__divdf3(0x7feffffffffffffd, 0x4010000000000000, 0x7fcffffffffffffd);
+ status |=
+ test__divdf3(0x7feffffffffffffd, 0xc010000000000000, 0xffcffffffffffffd);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0x0000000000000001, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0x3fefffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0x7fcfffffffffffff, 0x4010000000000000);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0x7fdfffffffffffff, 0x4000000000000000);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0xc000000000000000, 0xffdfffffffffffff);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0xffcfffffffffffff, 0xc010000000000000);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0xfff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x0000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x0000000000000001, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x0010000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x001fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x3ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x4014000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x7fdfffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x7fe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x8000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x8000000000000002, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x800fffffffffffff, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x8010000000000001, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x8020000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0xc008000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0xc01c000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0xffcfffffffffffff, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0xffe0000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0xffefffffffffffff, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x0000000000000003, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x000fffffffffffff, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x0010000000000001, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x0020000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x4000000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x4018000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x7fcfffffffffffff, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x7fd0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x8000000000000004, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x800fffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x8010000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x801fffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0xc010000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0xc020000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0xffd0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0xffdfffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000001, 0x3fe0000000000000, 0x8000000000000002);
+ status |=
+ test__divdf3(0x8000000000000001, 0x4000000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000001, 0x7fefffffffffffff, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000001, 0xc000000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000001, 0xffefffffffffffff, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8000000000000003, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x8000000000000003, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8000000000000004, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x8000000000000004, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x800ffffffffffff8, 0x3feffffffffffffe, 0x800ffffffffffff9);
+ status |=
+ test__divdf3(0x800fffffffffffff, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x800fffffffffffff, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x800fffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x800fffffffffffff, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8010000000000000, 0x3ff0000000000001, 0x800fffffffffffff);
+ status |=
+ test__divdf3(0x8010000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x8010000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8010000000000001, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x8010000000000001, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x801fffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x801fffffffffffff, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0x8020000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0x8020000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0x8020000000000001, 0x0010000000000001, 0xc000000000000000);
+ status |=
+ test__divdf3(0x8020000000000005, 0x0010000000000005, 0xc000000000000000);
+ status |=
+ test__divdf3(0xbff0000000000000, 0x3ff0000000000000, 0xbff0000000000000);
+ status |=
+ test__divdf3(0xbff0000000000000, 0xbff0000000000000, 0x3ff0000000000000);
+ status |=
+ test__divdf3(0xc000000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xc000000000000000, 0x3ff0000000000000, 0xc000000000000000);
+ status |=
+ test__divdf3(0xc000000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0xc000000000000000, 0xbff0000000000000, 0x4000000000000000);
+ status |=
+ test__divdf3(0xc010000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xc010000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0xc018000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xc018000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0xc018000000000000, 0xc008000000000000, 0x4000000000000000);
+ status |=
+ test__divdf3(0xc01c000000000000, 0x401c000000000000, 0xbff0000000000000);
+ status |=
+ test__divdf3(0xc020000000000000, 0x4000000000000000, 0xc010000000000000);
+ status |=
+ test__divdf3(0xc020000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xc020000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0xc022000000000000, 0xc008000000000000, 0x4008000000000000);
+ status |=
+ test__divdf3(0xffcfffffffffffff, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xffcfffffffffffff, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0xffd0000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xffd0000000000000, 0x7ff0000000000000, 0x8000000000000000);
+ status |=
+ test__divdf3(0xffd0000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xffd0000000000000, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0xffdfffffffffffff, 0x4000000000000000, 0xffcfffffffffffff);
+ status |=
+ test__divdf3(0xffdfffffffffffff, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xffe0000000000000, 0x3fe0000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xffe0000000000000, 0xbfe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xffe0000000000001, 0x7fd0000000000001, 0xc000000000000000);
+ status |=
+ test__divdf3(0xffeffffffffffffd, 0x4010000000000000, 0xffcffffffffffffd);
+ status |=
+ test__divdf3(0xffeffffffffffffd, 0xc010000000000000, 0x7fcffffffffffffd);
+ status |=
+ test__divdf3(0xffefffffffffffff, 0x7fcfffffffffffff, 0xc010000000000000);
+ status |=
+ test__divdf3(0xffefffffffffffff, 0xffcfffffffffffff, 0x4010000000000000);
+ status |=
+ test__divdf3(0xffefffffffffffff, 0xfff0000000000000, 0x0000000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x0000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x0000000000000003, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x000fffffffffffff, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x0010000000000001, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x0020000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x4000000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x4018000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x7fd0000000000000, 0xfff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x8000000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x8000000000000004, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x800fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x8010000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x801fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0xc010000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0xc020000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0xffd0000000000000, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0xffefffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__divdf3(0x800ffffffdffffff, 0xc00fff8000000000, 0x0004000fffbfff00);
+ status |=
+ test__divdf3(0xb7fbffffffffffff, 0xffe0000000000007, 0x0000000000000000);
+ status |=
+ test__divdf3(0x3ff660beb3029ffd, 0x3ff52e22fb7ace43, 0x3ff0e79e59ccb735);
+ status |=
+ test__divdf3(0x3ff73ddbc621eb00, 0x3ffb8224c030d747, 0x3feb095d4073d13b);
+ status |=
+ test__divdf3(0x3ff9a3b1ff2bf973, 0x3ff42fdf35d2d3bd, 0x3ff452508f203fca);
+ status |=
+ test__divdf3(0x3ffa2f42f2a01655, 0x3ff01310ba9f33d1, 0x3ffa103474220298);
+ status |=
+ test__divdf3(0x3ffa6b3e65d68478, 0x3ff773ca580800a9, 0x3ff206204bf651cc);
+ status |=
+ test__divdf3(0x3ffae840ed05aaad, 0x3ff374c8afa6bd73, 0x3ff620a0b38357dd);
+ status |=
+ test__divdf3(0x3ffc9bff90e124f7, 0x3ff19678d03f31b9, 0x3ffa06ce5731c244);
+ status |=
+ test__divdf3(0x3ff716518068f63e, 0x3ffea080001fffff, 0x3fe81f4927e2f813);
+ status |=
+ test__divdf3(0x3ff30b70c9e177b3, 0x3ffdc1dbcddeaaf7, 0x3fe47ae453d79b63);
+ status |=
+ test__divdf3(0x3ff690a0c1cf289e, 0x3ffdd0e4ec596ead, 0x3fe837c35c721292);
+ status |=
+ test__divdf3(0x3ff9a9f18698d1c5, 0x3ffdcf214b672807, 0x3feb8cd196d1e2db);
+ status |=
+ test__divdf3(0x3ffc412def95e9f2, 0x3ffe09fd73e44afb, 0x3fee195e4c411819);
+ status |=
+ test__divdf3(0x3ffab674f26df917, 0x3ffe55a80dfd623d, 0x3fec2de561fb628a);
+ status |=
+ test__divdf3(0x3ff15bb10851a33b, 0x3ffe770229894d4f, 0x3fe23b9bdf3ad4d7);
+ status |=
+ test__divdf3(0x3ff6ce035de00c24, 0x3fff04076d288c95, 0x3fe7874738e5ef5e);
+ status |=
+ test__divdf3(0x3ffb0e73f83fd2b4, 0x3fff01150ca4f6e3, 0x3febece97e64ff65);
+ status |=
+ test__divdf3(0x3ff53fff6c6d7043, 0x3fffb55c0bf15be1, 0x3fe57204f8441410);
+ status |=
+ test__divdf3(0x3ffa8aa3bbff7c4b, 0x3fffd530fa74cc5f, 0x3feaae55281a47cf);
+ status |=
+ test__divdf3(0x3ff3004b0d901379, 0x3ffe470662686931, 0x3fe41508eef9d818);
+ status |=
+ test__divdf3(0x3ffac10f29e80b25, 0x3ffe2fba9d423c9d, 0x3fec5c8a8148eb26);
+ status |=
+ test__divdf3(0x3ff8a3e14fe0651f, 0x3ffdeeae50e07679, 0x3fea579ce7a3f61c);
+ status |=
+ test__divdf3(0x3ff168321760dd0d, 0x3ffd382a2b3c2c27, 0x3fe31042c5fcbe35);
+ status |=
+ test__divdf3(0x3ff208350f930e99, 0x3ffc80beeab6d9ed, 0x3fe43e9486314a0e);
+ status |=
+ test__divdf3(0x3ff46a9470b46af6, 0x3ffc2e13c9335b3f, 0x3fe72f150e86f5a1);
+ status |=
+ test__divdf3(0x3ffaf26f45d21562, 0x3ffbe6d631b290e7, 0x3feee7b30b353e95);
+ status |=
+ test__divdf3(0x3ff5cda6f52381df, 0x3ffbe2a5bce4483f, 0x3fe90542a0e62c21);
+ status |=
+ test__divdf3(0x3ff92aeb8209bb69, 0x3ffb57a0bdf7af6f, 0x3fed74754022b839);
+ status |=
+ test__divdf3(0x3ff627c9c1a1903d, 0x3ffb3c161457a7e1, 0x3fea082feee891f0);
+ status |=
+ test__divdf3(0x3ffa5fef91208fd5, 0x3ff68928392cf5e7, 0x3ff2b9c16cd0a6eb);
+ status |=
+ test__divdf3(0x3ffdc6825d6a2ad2, 0x3ff69bb9ca89cd3f, 0x3ff5127c1399515f);
+ status |=
+ test__divdf3(0x3ffd62dbb1150699, 0x3ff6e12d3daf7823, 0x3ff48cd52e787bc5);
+ status |=
+ test__divdf3(0x3ffb9f0e3f946dd2, 0x3ff75a51f01f688b, 0x3ff2ecadebdfdf91);
+ status |=
+ test__divdf3(0x3ffdf21fc13ef609, 0x3ff77a80c8098ae1, 0x3ff46843217c9c90);
+ status |=
+ test__divdf3(0x3ff83f6d28924d31, 0x3ff7cb607bcc758f, 0x3ff04e08e26c84b7);
+ status |=
+ test__divdf3(0x3ffef8774307cea5, 0x3ff849124d13461d, 0x3ff467851369d61a);
+ status |=
+ test__divdf3(0x3ffd7c2259068fa2, 0x3ffa9e9faf8d6845, 0x3ff1b8e24ddeb546);
+ status |=
+ test__divdf3(0x3fffb10b35d3977b, 0x3ffb57a0bdf7af6f, 0x3ff28b8abfdd47c7);
+ status |=
+ test__divdf3(0x3ffdcfa4097387f1, 0x3ffbe6d631b290e7, 0x3ff1184cf4cac16b);
+ status |=
+ test__divdf3(0x3ffcb6231a615d02, 0x3ffb98faef6f9417, 0x3ff0a552a67a8e2d);
+ status |=
+ test__divdf3(0x3ffba5443a5d0a42, 0x3ffb3a5c10922a9d, 0x3ff03ed2622d2a26);
+ status |=
+ test__divdf3(0x3fff3144ae86b33e, 0x3ffa58948417f235, 0x3ff2f17912d557f2);
+ status |=
+ test__divdf3(0x3ffd68635bf6605a, 0x3ff945fce3a79f3f, 0x3ff29e0c7d6617a1);
+ status |=
+ test__divdf3(0x3ff97e6030354676, 0x3ff906f78f460697, 0x3ff04c56a5f3136d);
+ status |=
+ test__divdf3(0x3ffe86f743594e95, 0x3ff8444d7946422d, 0x3ff420b1e63f512e);
+ status |=
+ test__divdf3(0x3fff12a6c5539a9a, 0x3ff7cad48079af09, 0x3ff4e564f736b864);
+ status |=
+ test__divdf3(0x3ffa5371fe989251, 0x3ff6fc5272dc36d1, 0x3ff2533d7a4d0ee8);
+ status |=
+ test__divdf3(0x3ffe18c0547f65d2, 0x3ff6fc9e8dd915ed, 0x3ff4f2e7f917b80e);
+ status |=
+ test__divdf3(0x3ffd7aea8a297055, 0x3ff64eb95d608cd9, 0x3ff52500dc28664c);
// Test that the result of an operation is a NaN at all when it should be.
//
@@ -382,17 +710,28 @@ int main(void) {
// encoding. We also use the same value as the input NaN in tests that have
// one, so that even in EXPECT_EXACT_RESULTS mode these tests should pass,
// because 0x7ff8000000000000 is still the exact expected NaN.
- status |= test__divdf3(0x0000000000000000, 0x0000000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x0000000000000000, 0x8000000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x7ff0000000000000, 0xfff0000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x8000000000000000, 0x0000000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x8000000000000000, 0x8000000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0xfff0000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0xfff0000000000000, 0xfff0000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x3ff0000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x7ff8000000000000, 0x3ff0000000000000, 0x7ff8000000000000);
- status |= test__divdf3(0x7ff8000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x0000000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x0000000000000000, 0x8000000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0xfff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x0000000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x8000000000000000, 0x8000000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0xfff0000000000000, 0xfff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x7ff8000000000000, 0x3ff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__divdf3(0x7ff8000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
#ifdef ARM_NAN_HANDLING
// Tests specific to the NaN handling of Arm hardware, mimicked by
@@ -412,58 +751,110 @@ int main(void) {
//
// - invalid operations not involving an input NaN return the quiet
// NaN with fewest bits set, 0x7ff8000000000000.
- status |= test__divdf3(0x0000000000000000, 0x7ff3758244400801, 0x7ffb758244400801);
- status |= test__divdf3(0x0000000000000000, 0x7fff44d3f65148af, 0x7fff44d3f65148af);
- status |= test__divdf3(0x0000000000000001, 0x7ff48607b4b37057, 0x7ffc8607b4b37057);
- status |= test__divdf3(0x0000000000000001, 0x7ff855f2d435b33d, 0x7ff855f2d435b33d);
- status |= test__divdf3(0x000fffffffffffff, 0x7ff169269a674e13, 0x7ff969269a674e13);
- status |= test__divdf3(0x000fffffffffffff, 0x7ffc80978b2ef0da, 0x7ffc80978b2ef0da);
- status |= test__divdf3(0x3ff0000000000000, 0x7ff3458ad034593d, 0x7ffb458ad034593d);
- status |= test__divdf3(0x3ff0000000000000, 0x7ffdd8bb98c9f13a, 0x7ffdd8bb98c9f13a);
- status |= test__divdf3(0x7fefffffffffffff, 0x7ff79a8b96250a98, 0x7fff9a8b96250a98);
- status |= test__divdf3(0x7fefffffffffffff, 0x7ffdcc675b63bb94, 0x7ffdcc675b63bb94);
- status |= test__divdf3(0x7ff0000000000000, 0x7ff018cfaf4d0fff, 0x7ff818cfaf4d0fff);
- status |= test__divdf3(0x7ff0000000000000, 0x7ff83ad1ab4dfd24, 0x7ff83ad1ab4dfd24);
- status |= test__divdf3(0x7ff48ce6c0cdd5ac, 0x0000000000000000, 0x7ffc8ce6c0cdd5ac);
- status |= test__divdf3(0x7ff08a34f3d5385b, 0x0000000000000001, 0x7ff88a34f3d5385b);
- status |= test__divdf3(0x7ff0a264c1c96281, 0x000fffffffffffff, 0x7ff8a264c1c96281);
- status |= test__divdf3(0x7ff77ce629e61f0e, 0x3ff0000000000000, 0x7fff7ce629e61f0e);
- status |= test__divdf3(0x7ff715e2d147fd76, 0x7fefffffffffffff, 0x7fff15e2d147fd76);
- status |= test__divdf3(0x7ff689a2031f1781, 0x7ff0000000000000, 0x7ffe89a2031f1781);
- status |= test__divdf3(0x7ff5dfb4a0c8cd05, 0x7ff11c1fe9793a33, 0x7ffddfb4a0c8cd05);
- status |= test__divdf3(0x7ff5826283ffb5d7, 0x7fff609b83884e81, 0x7ffd826283ffb5d7);
- status |= test__divdf3(0x7ff7cb03f2e61d42, 0x8000000000000000, 0x7fffcb03f2e61d42);
- status |= test__divdf3(0x7ff2adc8dfe72c96, 0x8000000000000001, 0x7ffaadc8dfe72c96);
- status |= test__divdf3(0x7ff4fc0bacc707f2, 0x800fffffffffffff, 0x7ffcfc0bacc707f2);
- status |= test__divdf3(0x7ff76248c8c9a619, 0xbff0000000000000, 0x7fff6248c8c9a619);
- status |= test__divdf3(0x7ff367972fce131b, 0xffefffffffffffff, 0x7ffb67972fce131b);
- status |= test__divdf3(0x7ff188f5ac284e92, 0xfff0000000000000, 0x7ff988f5ac284e92);
- status |= test__divdf3(0x7ffed4c22e4e569d, 0x0000000000000000, 0x7ffed4c22e4e569d);
- status |= test__divdf3(0x7ffe95105fa3f339, 0x0000000000000001, 0x7ffe95105fa3f339);
- status |= test__divdf3(0x7ffb8d33dbb9ecfb, 0x000fffffffffffff, 0x7ffb8d33dbb9ecfb);
- status |= test__divdf3(0x7ff874e41dc63e07, 0x3ff0000000000000, 0x7ff874e41dc63e07);
- status |= test__divdf3(0x7ffe27594515ecdf, 0x7fefffffffffffff, 0x7ffe27594515ecdf);
- status |= test__divdf3(0x7ffeac86d5c69bdf, 0x7ff0000000000000, 0x7ffeac86d5c69bdf);
- status |= test__divdf3(0x7ff97d657b99f76f, 0x7ff7e4149862a796, 0x7fffe4149862a796);
- status |= test__divdf3(0x7ffad17c6aa33fad, 0x7ffd898893ad4d28, 0x7ffad17c6aa33fad);
- status |= test__divdf3(0x7ff96e04e9c3d173, 0x8000000000000000, 0x7ff96e04e9c3d173);
- status |= test__divdf3(0x7ffec01ad8da3abb, 0x8000000000000001, 0x7ffec01ad8da3abb);
- status |= test__divdf3(0x7ffd1d565c495941, 0x800fffffffffffff, 0x7ffd1d565c495941);
- status |= test__divdf3(0x7ffe3d24f1e474a7, 0xbff0000000000000, 0x7ffe3d24f1e474a7);
- status |= test__divdf3(0x7ffc206f2bb8c8ce, 0xffefffffffffffff, 0x7ffc206f2bb8c8ce);
- status |= test__divdf3(0x7ff93efdecfb7d3b, 0xfff0000000000000, 0x7ff93efdecfb7d3b);
- status |= test__divdf3(0x8000000000000000, 0x7ff2ee725d143ac5, 0x7ffaee725d143ac5);
- status |= test__divdf3(0x8000000000000000, 0x7ffbba26e5c5fe98, 0x7ffbba26e5c5fe98);
- status |= test__divdf3(0x8000000000000001, 0x7ff7818a1cd26df9, 0x7fff818a1cd26df9);
- status |= test__divdf3(0x8000000000000001, 0x7ffaee6cc63b5292, 0x7ffaee6cc63b5292);
- status |= test__divdf3(0x800fffffffffffff, 0x7ff401096edaf79d, 0x7ffc01096edaf79d);
- status |= test__divdf3(0x800fffffffffffff, 0x7ffbf1778c7a2e59, 0x7ffbf1778c7a2e59);
- status |= test__divdf3(0xbff0000000000000, 0x7ff2e8fb0201c496, 0x7ffae8fb0201c496);
- status |= test__divdf3(0xbff0000000000000, 0x7ffcb6a5adb2e154, 0x7ffcb6a5adb2e154);
- status |= test__divdf3(0xffefffffffffffff, 0x7ff1ea1bfc15d71d, 0x7ff9ea1bfc15d71d);
- status |= test__divdf3(0xffefffffffffffff, 0x7ffae0766e21efc0, 0x7ffae0766e21efc0);
- status |= test__divdf3(0xfff0000000000000, 0x7ff3b364cffbdfe6, 0x7ffbb364cffbdfe6);
- status |= test__divdf3(0xfff0000000000000, 0x7ffd0d3223334ae3, 0x7ffd0d3223334ae3);
+ status |=
+ test__divdf3(0x0000000000000000, 0x7ff3758244400801, 0x7ffb758244400801);
+ status |=
+ test__divdf3(0x0000000000000000, 0x7fff44d3f65148af, 0x7fff44d3f65148af);
+ status |=
+ test__divdf3(0x0000000000000001, 0x7ff48607b4b37057, 0x7ffc8607b4b37057);
+ status |=
+ test__divdf3(0x0000000000000001, 0x7ff855f2d435b33d, 0x7ff855f2d435b33d);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x7ff169269a674e13, 0x7ff969269a674e13);
+ status |=
+ test__divdf3(0x000fffffffffffff, 0x7ffc80978b2ef0da, 0x7ffc80978b2ef0da);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x7ff3458ad034593d, 0x7ffb458ad034593d);
+ status |=
+ test__divdf3(0x3ff0000000000000, 0x7ffdd8bb98c9f13a, 0x7ffdd8bb98c9f13a);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0x7ff79a8b96250a98, 0x7fff9a8b96250a98);
+ status |=
+ test__divdf3(0x7fefffffffffffff, 0x7ffdcc675b63bb94, 0x7ffdcc675b63bb94);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x7ff018cfaf4d0fff, 0x7ff818cfaf4d0fff);
+ status |=
+ test__divdf3(0x7ff0000000000000, 0x7ff83ad1ab4dfd24, 0x7ff83ad1ab4dfd24);
+ status |=
+ test__divdf3(0x7ff48ce6c0cdd5ac, 0x0000000000000000, 0x7ffc8ce6c0cdd5ac);
+ status |=
+ test__divdf3(0x7ff08a34f3d5385b, 0x0000000000000001, 0x7ff88a34f3d5385b);
+ status |=
+ test__divdf3(0x7ff0a264c1c96281, 0x000fffffffffffff, 0x7ff8a264c1c96281);
+ status |=
+ test__divdf3(0x7ff77ce629e61f0e, 0x3ff0000000000000, 0x7fff7ce629e61f0e);
+ status |=
+ test__divdf3(0x7ff715e2d147fd76, 0x7fefffffffffffff, 0x7fff15e2d147fd76);
+ status |=
+ test__divdf3(0x7ff689a2031f1781, 0x7ff0000000000000, 0x7ffe89a2031f1781);
+ status |=
+ test__divdf3(0x7ff5dfb4a0c8cd05, 0x7ff11c1fe9793a33, 0x7ffddfb4a0c8cd05);
+ status |=
+ test__divdf3(0x7ff5826283ffb5d7, 0x7fff609b83884e81, 0x7ffd826283ffb5d7);
+ status |=
+ test__divdf3(0x7ff7cb03f2e61d42, 0x8000000000000000, 0x7fffcb03f2e61d42);
+ status |=
+ test__divdf3(0x7ff2adc8dfe72c96, 0x8000000000000001, 0x7ffaadc8dfe72c96);
+ status |=
+ test__divdf3(0x7ff4fc0bacc707f2, 0x800fffffffffffff, 0x7ffcfc0bacc707f2);
+ status |=
+ test__divdf3(0x7ff76248c8c9a619, 0xbff0000000000000, 0x7fff6248c8c9a619);
+ status |=
+ test__divdf3(0x7ff367972fce131b, 0xffefffffffffffff, 0x7ffb67972fce131b);
+ status |=
+ test__divdf3(0x7ff188f5ac284e92, 0xfff0000000000000, 0x7ff988f5ac284e92);
+ status |=
+ test__divdf3(0x7ffed4c22e4e569d, 0x0000000000000000, 0x7ffed4c22e4e569d);
+ status |=
+ test__divdf3(0x7ffe95105fa3f339, 0x0000000000000001, 0x7ffe95105fa3f339);
+ status |=
+ test__divdf3(0x7ffb8d33dbb9ecfb, 0x000fffffffffffff, 0x7ffb8d33dbb9ecfb);
+ status |=
+ test__divdf3(0x7ff874e41dc63e07, 0x3ff0000000000000, 0x7ff874e41dc63e07);
+ status |=
+ test__divdf3(0x7ffe27594515ecdf, 0x7fefffffffffffff, 0x7ffe27594515ecdf);
+ status |=
+ test__divdf3(0x7ffeac86d5c69bdf, 0x7ff0000000000000, 0x7ffeac86d5c69bdf);
+ status |=
+ test__divdf3(0x7ff97d657b99f76f, 0x7ff7e4149862a796, 0x7fffe4149862a796);
+ status |=
+ test__divdf3(0x7ffad17c6aa33fad, 0x7ffd898893ad4d28, 0x7ffad17c6aa33fad);
+ status |=
+ test__divdf3(0x7ff96e04e9c3d173, 0x8000000000000000, 0x7ff96e04e9c3d173);
+ status |=
+ test__divdf3(0x7ffec01ad8da3abb, 0x8000000000000001, 0x7ffec01ad8da3abb);
+ status |=
+ test__divdf3(0x7ffd1d565c495941, 0x800fffffffffffff, 0x7ffd1d565c495941);
+ status |=
+ test__divdf3(0x7ffe3d24f1e474a7, 0xbff0000000000000, 0x7ffe3d24f1e474a7);
+ status |=
+ test__divdf3(0x7ffc206f2bb8c8ce, 0xffefffffffffffff, 0x7ffc206f2bb8c8ce);
+ status |=
+ test__divdf3(0x7ff93efdecfb7d3b, 0xfff0000000000000, 0x7ff93efdecfb7d3b);
+ status |=
+ test__divdf3(0x8000000000000000, 0x7ff2ee725d143ac5, 0x7ffaee725d143ac5);
+ status |=
+ test__divdf3(0x8000000000000000, 0x7ffbba26e5c5fe98, 0x7ffbba26e5c5fe98);
+ status |=
+ test__divdf3(0x8000000000000001, 0x7ff7818a1cd26df9, 0x7fff818a1cd26df9);
+ status |=
+ test__divdf3(0x8000000000000001, 0x7ffaee6cc63b5292, 0x7ffaee6cc63b5292);
+ status |=
+ test__divdf3(0x800fffffffffffff, 0x7ff401096edaf79d, 0x7ffc01096edaf79d);
+ status |=
+ test__divdf3(0x800fffffffffffff, 0x7ffbf1778c7a2e59, 0x7ffbf1778c7a2e59);
+ status |=
+ test__divdf3(0xbff0000000000000, 0x7ff2e8fb0201c496, 0x7ffae8fb0201c496);
+ status |=
+ test__divdf3(0xbff0000000000000, 0x7ffcb6a5adb2e154, 0x7ffcb6a5adb2e154);
+ status |=
+ test__divdf3(0xffefffffffffffff, 0x7ff1ea1bfc15d71d, 0x7ff9ea1bfc15d71d);
+ status |=
+ test__divdf3(0xffefffffffffffff, 0x7ffae0766e21efc0, 0x7ffae0766e21efc0);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x7ff3b364cffbdfe6, 0x7ffbb364cffbdfe6);
+ status |=
+ test__divdf3(0xfff0000000000000, 0x7ffd0d3223334ae3, 0x7ffd0d3223334ae3);
#endif // ARM_NAN_HANDLING
diff --git a/compiler-rt/test/builtins/Unit/muldf3new_test.c b/compiler-rt/test/builtins/Unit/muldf3new_test.c
index 809f40a95b95a..c2e39254fbc46 100644
--- a/compiler-rt/test/builtins/Unit/muldf3new_test.c
+++ b/compiler-rt/test/builtins/Unit/muldf3new_test.c
@@ -24,7 +24,8 @@
// Returns: a * b
COMPILER_RT_ABI double __muldf3(double a, double b);
-int test__muldf3(int line, uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep) {
+int test__muldf3(int line, uint64_t a_rep, uint64_t b_rep,
+ uint64_t expected_rep) {
double a = fromRep64(a_rep), b = fromRep64(b_rep);
double x = __muldf3(a, b);
#ifdef EXPECT_EXACT_RESULTS
@@ -34,334 +35,650 @@ int test__muldf3(int line, uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep
#endif
if (ret) {
- printf("error at line %d: __muldf3(%016" PRIx64 ", %016" PRIx64 ") = %016" PRIx64
- ", expected %016" PRIx64 "\n",
+ printf("error at line %d: __muldf3(%016" PRIx64 ", %016" PRIx64
+ ") = %016" PRIx64 ", expected %016" PRIx64 "\n",
line, a_rep, b_rep, toRep64(x), expected_rep);
}
return ret;
}
-#define test__muldf3(a,b,x) test__muldf3(__LINE__,a,b,x)
+#define test__muldf3(a, b, x) test__muldf3(__LINE__, a, b, x)
int main(void) {
int status = 0;
- status |= test__muldf3(0x0000000000000000, 0x0000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x000fffffffffffff, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x001fffffffffffff, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x3ff0000000000000, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x7fdfffffffffffff, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x8000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x8000000000000002, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x800fffffffffffff, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x8010000000000001, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0x8020000000000000, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0xc008000000000000, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0xffcfffffffffffff, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0xffe0000000000000, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000000, 0xffefffffffffffff, 0x8000000000000000);
- status |= test__muldf3(0x0000000000000001, 0x0000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000001, 0x0000000000000001, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000001, 0x3fe0000000000000, 0x0000000000000000);
- status |= test__muldf3(0x0000000000000001, 0x3fefffffffffffff, 0x0000000000000001);
- status |= test__muldf3(0x0000000000000001, 0x3ff0000000000000, 0x0000000000000001);
- status |= test__muldf3(0x0000000000000001, 0x4000000000000000, 0x0000000000000002);
- status |= test__muldf3(0x0000000000000001, 0x7ff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x0000000000000001, 0xbfefffffffffffff, 0x8000000000000001);
- status |= test__muldf3(0x0000000000000006, 0x3fe0000000000000, 0x0000000000000003);
- status |= test__muldf3(0x0000000000000006, 0xbfe0000000000000, 0x8000000000000003);
- status |= test__muldf3(0x0000000000000008, 0x3fc0000000000000, 0x0000000000000001);
- status |= test__muldf3(0x000ffffffffffff7, 0x8020000000000003, 0x8000000000000000);
- status |= test__muldf3(0x000ffffffffffff8, 0x3ff0000000000001, 0x000ffffffffffff9);
- status |= test__muldf3(0x000ffffffffffff8, 0x3ff0000000000008, 0x0010000000000000);
- status |= test__muldf3(0x000ffffffffffff8, 0xbff0000000000001, 0x800ffffffffffff9);
- status |= test__muldf3(0x000ffffffffffff8, 0xbff0000000000008, 0x8010000000000000);
- status |= test__muldf3(0x000ffffffffffffc, 0x4000000000000000, 0x001ffffffffffff8);
- status |= test__muldf3(0x000ffffffffffffe, 0x3feffffffffffffc, 0x000ffffffffffffc);
- status |= test__muldf3(0x000ffffffffffffe, 0x3ff0000000000001, 0x000fffffffffffff);
- status |= test__muldf3(0x000ffffffffffffe, 0xbff0000000000001, 0x800fffffffffffff);
- status |= test__muldf3(0x000fffffffffffff, 0x000ffffffffffffe, 0x0000000000000000);
- status |= test__muldf3(0x000fffffffffffff, 0x3cb0000000000001, 0x0000000000000001);
- status |= test__muldf3(0x000fffffffffffff, 0x3fe0000000000001, 0x0008000000000000);
- status |= test__muldf3(0x000fffffffffffff, 0x3ff0000000000001, 0x0010000000000000);
- status |= test__muldf3(0x000fffffffffffff, 0x4000000000000000, 0x001ffffffffffffe);
- status |= test__muldf3(0x0010000000000000, 0x0000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x0010000000000000, 0x0010000000000000, 0x0000000000000000);
- status |= test__muldf3(0x0010000000000000, 0x3feffffffffffffe, 0x000fffffffffffff);
- status |= test__muldf3(0x0010000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x0010000000000000, 0x8010000000000000, 0x8000000000000000);
- status |= test__muldf3(0x0010000000000000, 0xc000000000000000, 0x8020000000000000);
- status |= test__muldf3(0x0010000000000001, 0x3feffffffffffffa, 0x000ffffffffffffe);
- status |= test__muldf3(0x0010000000000001, 0x3feffffffffffffe, 0x0010000000000000);
- status |= test__muldf3(0x0010000000000001, 0xc000000000000000, 0x8020000000000001);
- status |= test__muldf3(0x0010000000000002, 0x3feffffffffffffc, 0x0010000000000000);
- status |= test__muldf3(0x001ffffffffffff8, 0x3fe0000000000000, 0x000ffffffffffffc);
- status |= test__muldf3(0x001ffffffffffffe, 0x3fe0000000000000, 0x000fffffffffffff);
- status |= test__muldf3(0x001ffffffffffffe, 0xbfe0000000000000, 0x800fffffffffffff);
- status |= test__muldf3(0x001fffffffffffff, 0x3fe0000000000000, 0x0010000000000000);
- status |= test__muldf3(0x001fffffffffffff, 0xbfe0000000000000, 0x8010000000000000);
- status |= test__muldf3(0x3fe0000000000000, 0x8000000000000001, 0x8000000000000000);
- status |= test__muldf3(0x3ff0000000000000, 0x000ffffffffffffd, 0x000ffffffffffffd);
- status |= test__muldf3(0x3ff0000000000000, 0x0020000000000003, 0x0020000000000003);
- status |= test__muldf3(0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000);
- status |= test__muldf3(0x3ff0000000000000, 0x4000000000000000, 0x4000000000000000);
- status |= test__muldf3(0x3ff0000000000000, 0x8000000000000001, 0x8000000000000001);
- status |= test__muldf3(0x3ff0000000000000, 0x8000000000000009, 0x8000000000000009);
- status |= test__muldf3(0x3ff0000000000001, 0x3ff0000000000001, 0x3ff0000000000002);
- status |= test__muldf3(0x3ff0000000000001, 0xbff0000000000001, 0xbff0000000000002);
- status |= test__muldf3(0x3ff0000000000001, 0xbff0000000000002, 0xbff0000000000003);
- status |= test__muldf3(0x3ff0000000000002, 0x3ff0000000000001, 0x3ff0000000000003);
- status |= test__muldf3(0x3ff0000000000002, 0x7feffffffffffffe, 0x7ff0000000000000);
- status |= test__muldf3(0x3ff0000000000001, 0x7feffffffffffffe, 0x7ff0000000000000);
- status |= test__muldf3(0x4000000000000000, 0x0010000000000000, 0x0020000000000000);
- status |= test__muldf3(0x4000000000000000, 0x0010000000000001, 0x0020000000000001);
- status |= test__muldf3(0x4000000000000000, 0x3ff0000000000000, 0x4000000000000000);
- status |= test__muldf3(0x4000000000000000, 0x4008000000000000, 0x4018000000000000);
- status |= test__muldf3(0x4000000000000000, 0x7fd0000000000000, 0x7fe0000000000000);
- status |= test__muldf3(0x4000000000000000, 0x7fdfffffffffffff, 0x7fefffffffffffff);
- status |= test__muldf3(0x4000000000000000, 0x800ffffffffffffd, 0x801ffffffffffffa);
- status |= test__muldf3(0x4000000000000000, 0x8010000000000003, 0x8020000000000003);
- status |= test__muldf3(0x4000000000000000, 0x8010000000000005, 0x8020000000000005);
- status |= test__muldf3(0x4000000000000000, 0xbff0000000000000, 0xc000000000000000);
- status |= test__muldf3(0x4000000000000000, 0xffcffffffffffffd, 0xffdffffffffffffd);
- status |= test__muldf3(0x4000000000000000, 0xffd0000000000003, 0xffe0000000000003);
- status |= test__muldf3(0x4007ffffffffffff, 0x3feffffffffffffd, 0x4007fffffffffffd);
- status |= test__muldf3(0x4007ffffffffffff, 0x3feffffffffffffe, 0x4007fffffffffffe);
- status |= test__muldf3(0x4007ffffffffffff, 0x3fefffffffffffff, 0x4007fffffffffffe);
- status |= test__muldf3(0x4007ffffffffffff, 0xbfeffffffffffffd, 0xc007fffffffffffd);
- status |= test__muldf3(0x4008000000000000, 0x0000000000000002, 0x0000000000000006);
- status |= test__muldf3(0x4008000000000000, 0x4000000000000000, 0x4018000000000000);
- status |= test__muldf3(0x4008000000000000, 0x4008000000000000, 0x4022000000000000);
- status |= test__muldf3(0x4008000000000000, 0xc000000000000000, 0xc018000000000000);
- status |= test__muldf3(0x4008000000000001, 0x3ff0000000000001, 0x4008000000000003);
- status |= test__muldf3(0x4008000000000001, 0x3ff0000000000003, 0x4008000000000006);
- status |= test__muldf3(0x4008000000000001, 0xbff0000000000003, 0xc008000000000006);
- status |= test__muldf3(0x4010000000000000, 0x0000000000000002, 0x0000000000000008);
- status |= test__muldf3(0x4010000000000000, 0x7fcfffffffffffff, 0x7fefffffffffffff);
- status |= test__muldf3(0x4010000000000000, 0xffcfffffffffffff, 0xffefffffffffffff);
- status |= test__muldf3(0x4013ffffffffffff, 0x3fefffffffffffff, 0x4013fffffffffffe);
- status |= test__muldf3(0x4014000000000000, 0x0000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x4014000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x4014000000000001, 0x3ff0000000000001, 0x4014000000000002);
- status |= test__muldf3(0x401bffffffffffff, 0x3feffffffffffffc, 0x401bfffffffffffc);
- status |= test__muldf3(0x401bffffffffffff, 0x3fefffffffffffff, 0x401bfffffffffffe);
- status |= test__muldf3(0x401c000000000000, 0x8000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x401c000000000000, 0xfff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x401c000000000001, 0x3ff0000000000001, 0x401c000000000003);
- status |= test__muldf3(0x7fcffffffffffffd, 0x4010000000000000, 0x7feffffffffffffd);
- status |= test__muldf3(0x7fcffffffffffffd, 0xc010000000000000, 0xffeffffffffffffd);
- status |= test__muldf3(0x7fd0000000000000, 0xc000000000000000, 0xffe0000000000000);
- status |= test__muldf3(0x7fdffffffffffffd, 0xc000000000000008, 0xfff0000000000000);
- status |= test__muldf3(0x7fdfffffffffffff, 0xc000000000000000, 0xffefffffffffffff);
- status |= test__muldf3(0x7fe0000000000000, 0x0000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0x4000000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0x7fe0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0x7feffffffffffffe, 0x7ff0000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0xffd0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0xffd0000000000004, 0xfff0000000000000);
- status |= test__muldf3(0x7fe0000000000000, 0xffe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x7fe0000000000009, 0x7feffffffffffffa, 0x7ff0000000000000);
- status |= test__muldf3(0x7fe0000000000009, 0xc018000000000002, 0xfff0000000000000);
- status |= test__muldf3(0x7fefffffffffffff, 0x0000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x001fffffffffffff, 0x7ff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x3ff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x7fdfffffffffffff, 0x7ff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x8000000000000002, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x800fffffffffffff, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x8010000000000001, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x8020000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0xc008000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0xffe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0xffefffffffffffff, 0xfff0000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0xfff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x8000000000000000, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x8000000000000000, 0x4018000000000000, 0x8000000000000000);
- status |= test__muldf3(0x8000000000000000, 0x7fefffffffffffff, 0x8000000000000000);
- status |= test__muldf3(0x8000000000000000, 0x8000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x8000000000000000, 0x8000000000000004, 0x0000000000000000);
- status |= test__muldf3(0x8000000000000000, 0x8010000000000000, 0x0000000000000000);
- status |= test__muldf3(0x8000000000000000, 0xc020000000000000, 0x0000000000000000);
- status |= test__muldf3(0x8000000000000000, 0xffd0000000000000, 0x0000000000000000);
- status |= test__muldf3(0x8000000000000001, 0x0000000000000001, 0x8000000000000000);
- status |= test__muldf3(0x8000000000000001, 0x4014000000000000, 0x8000000000000005);
- status |= test__muldf3(0x8000000000000002, 0x3ff0000000000000, 0x8000000000000002);
- status |= test__muldf3(0x8000000000000003, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x8000000000000003, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x8000000000000004, 0xbff0000000000000, 0x0000000000000004);
- status |= test__muldf3(0x8000000000000008, 0x3fc0000000000000, 0x8000000000000001);
- status |= test__muldf3(0x800ffffffffffff7, 0x0020000000000003, 0x8000000000000000);
- status |= test__muldf3(0x800ffffffffffff7, 0x3ff0000000000001, 0x800ffffffffffff8);
- status |= test__muldf3(0x800ffffffffffffd, 0xc000000000000000, 0x001ffffffffffffa);
- status |= test__muldf3(0x800fffffffffffff, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x800fffffffffffff, 0x3ff0000000000001, 0x8010000000000000);
- status |= test__muldf3(0x800fffffffffffff, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x800fffffffffffff, 0x8000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x800fffffffffffff, 0x800ffffffffffffe, 0x0000000000000000);
- status |= test__muldf3(0x800fffffffffffff, 0xbff0000000000000, 0x000fffffffffffff);
- status |= test__muldf3(0x800fffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x8010000000000000, 0x0010000000000000, 0x8000000000000000);
- status |= test__muldf3(0x8010000000000000, 0x8010000000000000, 0x0000000000000000);
- status |= test__muldf3(0x8010000000000001, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x8010000000000001, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0x8010000000000001, 0xbff0000000000000, 0x0010000000000001);
- status |= test__muldf3(0x801ffffffffffffc, 0x3fe0000000000000, 0x800ffffffffffffe);
- status |= test__muldf3(0x801ffffffffffffc, 0xbfe0000000000000, 0x000ffffffffffffe);
- status |= test__muldf3(0x801ffffffffffffe, 0x3ff0000000000000, 0x801ffffffffffffe);
- status |= test__muldf3(0x801fffffffffffff, 0x8000000000000000, 0x0000000000000000);
- status |= test__muldf3(0x801fffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x8020000000000000, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0x8020000000000000, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xbfefffffffffffff, 0xffefffffffffffff, 0x7feffffffffffffe);
- status |= test__muldf3(0xbff0000000000000, 0x0000000000000009, 0x8000000000000009);
- status |= test__muldf3(0xbff0000000000000, 0x0010000000000009, 0x8010000000000009);
- status |= test__muldf3(0xbff0000000000000, 0x3ff0000000000000, 0xbff0000000000000);
- status |= test__muldf3(0xbff0000000000000, 0x4000000000000000, 0xc000000000000000);
- status |= test__muldf3(0xbff0000000000000, 0xbff0000000000000, 0x3ff0000000000000);
- status |= test__muldf3(0xbff0000000000000, 0xc000000000000000, 0x4000000000000000);
- status |= test__muldf3(0xbff0000000000001, 0x3ff0000000000001, 0xbff0000000000002);
- status |= test__muldf3(0xbff0000000000001, 0xbff0000000000001, 0x3ff0000000000002);
- status |= test__muldf3(0xbff0000000000001, 0xbff0000000000002, 0x3ff0000000000003);
- status |= test__muldf3(0xbff0000000000002, 0x3ff0000000000001, 0xbff0000000000003);
- status |= test__muldf3(0xbff0000000000002, 0xbff0000000000001, 0x3ff0000000000003);
- status |= test__muldf3(0xc000000000000000, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0xc000000000000000, 0x000ffffffffffffd, 0x801ffffffffffffa);
- status |= test__muldf3(0xc000000000000000, 0x0010000000000001, 0x8020000000000001);
- status |= test__muldf3(0xc000000000000000, 0x0010000000000005, 0x8020000000000005);
- status |= test__muldf3(0xc000000000000000, 0x0010000000000009, 0x8020000000000009);
- status |= test__muldf3(0xc000000000000000, 0x4008000000000000, 0xc018000000000000);
- status |= test__muldf3(0xc000000000000000, 0x7fcfffffffffffff, 0xffdfffffffffffff);
- status |= test__muldf3(0xc000000000000000, 0x7fd0000000000001, 0xffe0000000000001);
- status |= test__muldf3(0xc000000000000000, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xc000000000000000, 0xbff0000000000000, 0x4000000000000000);
- status |= test__muldf3(0xc000000000000000, 0xc008000000000000, 0x4018000000000000);
- status |= test__muldf3(0xc007fffffffffffe, 0x7fe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xc007ffffffffffff, 0x3fefffffffffffff, 0xc007fffffffffffe);
- status |= test__muldf3(0xc008000000000000, 0x4008000000000000, 0xc022000000000000);
- status |= test__muldf3(0xc008000000000000, 0xc000000000000000, 0x4018000000000000);
- status |= test__muldf3(0xc008000000000000, 0xc008000000000000, 0x4022000000000000);
- status |= test__muldf3(0xc008000000000000, 0xffe0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xc008000000000001, 0x3ff0000000000001, 0xc008000000000003);
- status |= test__muldf3(0xc010000000000000, 0x7fcfffffffffffff, 0xffefffffffffffff);
- status |= test__muldf3(0xc010000000000000, 0x8000000000000000, 0x0000000000000000);
- status |= test__muldf3(0xc010000000000000, 0xffcfffffffffffff, 0x7fefffffffffffff);
- status |= test__muldf3(0xc010000000000000, 0xfff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xc013fffffffffffe, 0xffe0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xc013ffffffffffff, 0xbfefffffffffffff, 0x4013fffffffffffe);
- status |= test__muldf3(0xc014000000000001, 0xbff0000000000001, 0x4014000000000002);
- status |= test__muldf3(0xc01bfffffffffff9, 0x7fe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xc022000000000000, 0x7fe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xc022000000000001, 0xffe0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xffcffffffffffff9, 0x7fe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xffcffffffffffff9, 0xc00fffffffffffff, 0x7feffffffffffff8);
- status |= test__muldf3(0xffcffffffffffffd, 0x4010000000000000, 0xffeffffffffffffd);
- status |= test__muldf3(0xffcffffffffffffd, 0xc010000000000000, 0x7feffffffffffffd);
- status |= test__muldf3(0xffcfffffffffffff, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0xffcfffffffffffff, 0x4000000000000001, 0xffe0000000000000);
- status |= test__muldf3(0xffcfffffffffffff, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xffd0000000000000, 0x0000000000000000, 0x8000000000000000);
- status |= test__muldf3(0xffd0000000000000, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xffdffffffffffff7, 0x7fd0000000000001, 0xfff0000000000000);
- status |= test__muldf3(0xffdfffffffffffff, 0x3ff0000000000001, 0xffe0000000000000);
- status |= test__muldf3(0xffdfffffffffffff, 0x8000000000000000, 0x0000000000000000);
- status |= test__muldf3(0xffe0000000000005, 0xffe0000000000001, 0x7ff0000000000000);
- status |= test__muldf3(0xffeffffffffffffd, 0x7fe0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xffeffffffffffffd, 0xc008000000000001, 0x7ff0000000000000);
- status |= test__muldf3(0xffeffffffffffffd, 0xffe0000000000001, 0x7ff0000000000000);
- status |= test__muldf3(0xffefffffffffffff, 0x8000000000000000, 0x0000000000000000);
- status |= test__muldf3(0xffefffffffffffff, 0xffefffffffffffff, 0x7ff0000000000000);
- status |= test__muldf3(0xffefffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0x4018000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0x7ff0000000000000, 0xfff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0x8000000000000004, 0x7ff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0x8010000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0xc020000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0xffd0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0xfff0000000000000, 0xfff0000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x002ffffffe000000, 0x3fcffffffffffffd, 0x000ffffffeffffff);
- status |= test__muldf3(0xbfeffeffffffffff, 0x8010000000000100, 0x000fff80000000ff);
- status |= test__muldf3(0x802ffffffe000000, 0x3fcffffffffffffd, 0x800ffffffeffffff);
- status |= test__muldf3(0xbfeffeffffffffff, 0x0010000000000100, 0x800fff80000000ff);
- status |= test__muldf3(0xbf9e8325a5aa6c8d, 0xbf9e8325a5aa6c8d, 0x3f4d180013083955);
- status |= test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fe4000000000000, 0x3ff237a6f271c5c4);
- status |= test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fe4000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x201d25d7ea4fa2d4, 0x1fd4000000000000, 0x00091bd37938e2e2);
- status |= test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fe8000000000000, 0x3ff5dc61efbbba1f);
- status |= test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fe8000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x201d25d7ea4fa2d4, 0x1fd8000000000000, 0x000aee30f7dddd10);
- status |= test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fec000000000000, 0x3ff9811ced05ae7a);
- status |= test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fec000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x201d25d7ea4fa2d4, 0x1fdc000000000000, 0x000cc08e7682d73d);
- status |= test__muldf3(0x3ff265f139b6c87c, 0x3ff7000000000000, 0x3ffa728ac2f6c032);
- status |= test__muldf3(0x6ff265f139b6c87c, 0x4ff7000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x201265f139b6c87c, 0x1fe7000000000000, 0x000d3945617b6019);
- status |= test__muldf3(0x3ff265f139b6c87c, 0x3ff5000000000000, 0x3ff825cc9bbfe723);
- status |= test__muldf3(0x6ff265f139b6c87c, 0x4ff5000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x201265f139b6c87c, 0x1fe5000000000000, 0x000c12e64ddff391);
- status |= test__muldf3(0x3ffe5ab1dc9f12f9, 0x3ff0c1a10c80f0b7, 0x3fffca09666ab16e);
- status |= test__muldf3(0x6ffe5ab1dc9f12f9, 0x4ff0c1a10c80f0b7, 0x7ff0000000000000);
- status |= test__muldf3(0x201e5ab1dc9f12f9, 0x1fe0c1a10c80f0b7, 0x000fe504b33558b7);
- status |= test__muldf3(0x3ffe5ab1dc9f12f9, 0x3fe73e5ef37f0f49, 0x3ff60c59a0917f00);
- status |= test__muldf3(0x6ffe5ab1dc9f12f9, 0x4fe73e5ef37f0f49, 0x7ff0000000000000);
- status |= test__muldf3(0x201e5ab1dc9f12f9, 0x1fd73e5ef37f0f49, 0x000b062cd048bf80);
- status |= test__muldf3(0x3ffe5ab1dc9f12f9, 0x3fe8c1a10c80f0b7, 0x3ff77bb12a5d1d75);
- status |= test__muldf3(0x6ffe5ab1dc9f12f9, 0x4fe8c1a10c80f0b7, 0x7ff0000000000000);
- status |= test__muldf3(0x201e5ab1dc9f12f9, 0x1fd8c1a10c80f0b7, 0x000bbdd8952e8ebb);
- status |= test__muldf3(0x3ffc6be665de3b1d, 0x3fe52d156619a0cb, 0x3ff2ced9f056fba8);
- status |= test__muldf3(0x6ffc6be665de3b1d, 0x4fe52d156619a0cb, 0x7ff0000000000000);
- status |= test__muldf3(0x201c6be665de3b1d, 0x1fd52d156619a0cb, 0x0009676cf82b7dd4);
- status |= test__muldf3(0x3ffc6be665de3b1d, 0x3fead2ea99e65f35, 0x3ff7d2ffa8765d03);
- status |= test__muldf3(0x6ffc6be665de3b1d, 0x4fead2ea99e65f35, 0x7ff0000000000000);
- status |= test__muldf3(0x201c6be665de3b1d, 0x1fdad2ea99e65f35, 0x000be97fd43b2e82);
- status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ff5c9b956d0b54b, 0x3ff82c50eb71ac34);
- status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ff5c9b956d0b54b, 0x7ff0000000000000);
- status |= test__muldf3(0x2011c0635d3cd39d, 0x1fe5c9b956d0b54b, 0x000c162875b8d61a);
- status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ff23646a92f4ab5, 0x3ff434a77da664d4);
- status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ff23646a92f4ab5, 0x7ff0000000000000);
- status |= test__muldf3(0x2011c0635d3cd39d, 0x1fe23646a92f4ab5, 0x000a1a53bed3326a);
- status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ffa3646a92f4ab5, 0x3ffd14d92c44cea3);
- status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ffa3646a92f4ab5, 0x7ff0000000000000);
- status |= test__muldf3(0x2011c0635d3cd39d, 0x1fea3646a92f4ab5, 0x000e8a6c96226751);
- status |= test__muldf3(0x3ff1c0635d3cd39d, 0x3ff1c9b956d0b54b, 0x3ff3bc381422774d);
- status |= test__muldf3(0x6ff1c0635d3cd39d, 0x4ff1c9b956d0b54b, 0x7ff0000000000000);
- status |= test__muldf3(0x2011c0635d3cd39d, 0x1fe1c9b956d0b54b, 0x0009de1c0a113ba6);
- status |= test__muldf3(0x3ff907065fd11389, 0x3fe46bad37af52b9, 0x3feff135e5756ec7);
- status |= test__muldf3(0x6ff907065fd11389, 0x4fe46bad37af52b9, 0x7feff135e5756ec7);
- status |= test__muldf3(0x201907065fd11389, 0x1fd46bad37af52b9, 0x0007fc4d795d5bb2);
- status |= test__muldf3(0x3ff907065fd11389, 0x3feb9452c850ad47, 0x3ff591ee9cfee5ea);
- status |= test__muldf3(0x6ff907065fd11389, 0x4feb9452c850ad47, 0x7ff0000000000000);
- status |= test__muldf3(0x201907065fd11389, 0x1fdb9452c850ad47, 0x000ac8f74e7f72f5);
- status |= test__muldf3(0x3ff761c03e198df7, 0x3fe7f47c731d43c7, 0x3ff180e675617e83);
- status |= test__muldf3(0x6ff761c03e198df7, 0x4fe7f47c731d43c7, 0x7ff0000000000000);
- status |= test__muldf3(0x201761c03e198df7, 0x1fd7f47c731d43c7, 0x0008c0733ab0bf41);
- status |= test__muldf3(0x3ffce6d1246c46fb, 0x3ff0b3469ded2bcd, 0x3ffe2aa6f74c0ffd);
- status |= test__muldf3(0x6ffce6d1246c46fb, 0x4ff0b3469ded2bcd, 0x7ff0000000000000);
- status |= test__muldf3(0x201ce6d1246c46fb, 0x1fe0b3469ded2bcd, 0x000f15537ba607fe);
- status |= test__muldf3(0x3ffd5701100ec79d, 0x3fee654fee13094b, 0x3ffbde74e37bb583);
- status |= test__muldf3(0x6ffd5701100ec79d, 0x4fee654fee13094b, 0x7ff0000000000000);
- status |= test__muldf3(0x201d5701100ec79d, 0x1fde654fee13094b, 0x000def3a71bddac1);
- status |= test__muldf3(0x3ffce1a06e8bcfd3, 0x3ff01c54436a605b, 0x3ffd14c361885d61);
- status |= test__muldf3(0x6ffce1a06e8bcfd3, 0x4ff01c54436a605b, 0x7ff0000000000000);
- status |= test__muldf3(0x201ce1a06e8bcfd3, 0x1fe01c54436a605b, 0x000e8a61b0c42eb0);
- status |= test__muldf3(0x3ff21d1a5ca518a5, 0x3ff29f0ce1150f2d, 0x3ff514cd72d743f2);
- status |= test__muldf3(0x6ff21d1a5ca518a5, 0x4ff29f0ce1150f2d, 0x7ff0000000000000);
- status |= test__muldf3(0x20121d1a5ca518a5, 0x1fe29f0ce1150f2d, 0x000a8a66b96ba1f9);
- status |= test__muldf3(0x3ff031a98dbf97ba, 0x3ff4000000000000, 0x3ff43e13f12f7da8);
- status |= test__muldf3(0x6ff031a98dbf97ba, 0x4ff4000000000000, 0x7ff0000000000000);
- status |= test__muldf3(0x201031a98dbf97ba, 0x1fe4000000000000, 0x000a1f09f897bed4);
- status |= test__muldf3(0x0000000000000003, 0xc00fffffffffffff, 0x800000000000000c);
- status |= test__muldf3(0x0000000000000003, 0x400fffffffffffff, 0x000000000000000c);
- status |= test__muldf3(0x8000000000000003, 0xc00fffffffffffff, 0x000000000000000c);
- status |= test__muldf3(0x8000000000000003, 0x400fffffffffffff, 0x800000000000000c);
- status |= test__muldf3(0x0000000000000003, 0xc00ffffffffffffd, 0x800000000000000c);
- status |= test__muldf3(0x0000000000000003, 0x400ffffffffffffd, 0x000000000000000c);
- status |= test__muldf3(0x8000000000000003, 0xc00ffffffffffffd, 0x000000000000000c);
- status |= test__muldf3(0x8000000000000003, 0x400ffffffffffffd, 0x800000000000000c);
- status |= test__muldf3(0x1e51f703ee090000, 0x1e5c8000e4000000, 0x0000000000000001);
- status |= test__muldf3(0x1e561ed9745fdb21, 0x1e57255ca25b68e1, 0x0000000000000001);
- status |= test__muldf3(0x7feffffffff00000, 0xc000000000080000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x000fffffffffffff, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x001fffffffffffff, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x3ff0000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x7fdfffffffffffff, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x8000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x8000000000000002, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x800fffffffffffff, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x8010000000000001, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0x8020000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0xc008000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0xffcfffffffffffff, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0xffe0000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000000, 0xffefffffffffffff, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0000000000000001, 0x0000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000001, 0x0000000000000001, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000001, 0x3fe0000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0000000000000001, 0x3fefffffffffffff, 0x0000000000000001);
+ status |=
+ test__muldf3(0x0000000000000001, 0x3ff0000000000000, 0x0000000000000001);
+ status |=
+ test__muldf3(0x0000000000000001, 0x4000000000000000, 0x0000000000000002);
+ status |=
+ test__muldf3(0x0000000000000001, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x0000000000000001, 0xbfefffffffffffff, 0x8000000000000001);
+ status |=
+ test__muldf3(0x0000000000000006, 0x3fe0000000000000, 0x0000000000000003);
+ status |=
+ test__muldf3(0x0000000000000006, 0xbfe0000000000000, 0x8000000000000003);
+ status |=
+ test__muldf3(0x0000000000000008, 0x3fc0000000000000, 0x0000000000000001);
+ status |=
+ test__muldf3(0x000ffffffffffff7, 0x8020000000000003, 0x8000000000000000);
+ status |=
+ test__muldf3(0x000ffffffffffff8, 0x3ff0000000000001, 0x000ffffffffffff9);
+ status |=
+ test__muldf3(0x000ffffffffffff8, 0x3ff0000000000008, 0x0010000000000000);
+ status |=
+ test__muldf3(0x000ffffffffffff8, 0xbff0000000000001, 0x800ffffffffffff9);
+ status |=
+ test__muldf3(0x000ffffffffffff8, 0xbff0000000000008, 0x8010000000000000);
+ status |=
+ test__muldf3(0x000ffffffffffffc, 0x4000000000000000, 0x001ffffffffffff8);
+ status |=
+ test__muldf3(0x000ffffffffffffe, 0x3feffffffffffffc, 0x000ffffffffffffc);
+ status |=
+ test__muldf3(0x000ffffffffffffe, 0x3ff0000000000001, 0x000fffffffffffff);
+ status |=
+ test__muldf3(0x000ffffffffffffe, 0xbff0000000000001, 0x800fffffffffffff);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x000ffffffffffffe, 0x0000000000000000);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x3cb0000000000001, 0x0000000000000001);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x3fe0000000000001, 0x0008000000000000);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x3ff0000000000001, 0x0010000000000000);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x4000000000000000, 0x001ffffffffffffe);
+ status |=
+ test__muldf3(0x0010000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0010000000000000, 0x0010000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x0010000000000000, 0x3feffffffffffffe, 0x000fffffffffffff);
+ status |=
+ test__muldf3(0x0010000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x0010000000000000, 0x8010000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x0010000000000000, 0xc000000000000000, 0x8020000000000000);
+ status |=
+ test__muldf3(0x0010000000000001, 0x3feffffffffffffa, 0x000ffffffffffffe);
+ status |=
+ test__muldf3(0x0010000000000001, 0x3feffffffffffffe, 0x0010000000000000);
+ status |=
+ test__muldf3(0x0010000000000001, 0xc000000000000000, 0x8020000000000001);
+ status |=
+ test__muldf3(0x0010000000000002, 0x3feffffffffffffc, 0x0010000000000000);
+ status |=
+ test__muldf3(0x001ffffffffffff8, 0x3fe0000000000000, 0x000ffffffffffffc);
+ status |=
+ test__muldf3(0x001ffffffffffffe, 0x3fe0000000000000, 0x000fffffffffffff);
+ status |=
+ test__muldf3(0x001ffffffffffffe, 0xbfe0000000000000, 0x800fffffffffffff);
+ status |=
+ test__muldf3(0x001fffffffffffff, 0x3fe0000000000000, 0x0010000000000000);
+ status |=
+ test__muldf3(0x001fffffffffffff, 0xbfe0000000000000, 0x8010000000000000);
+ status |=
+ test__muldf3(0x3fe0000000000000, 0x8000000000000001, 0x8000000000000000);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x000ffffffffffffd, 0x000ffffffffffffd);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x0020000000000003, 0x0020000000000003);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x4000000000000000, 0x4000000000000000);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x8000000000000001, 0x8000000000000001);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x8000000000000009, 0x8000000000000009);
+ status |=
+ test__muldf3(0x3ff0000000000001, 0x3ff0000000000001, 0x3ff0000000000002);
+ status |=
+ test__muldf3(0x3ff0000000000001, 0xbff0000000000001, 0xbff0000000000002);
+ status |=
+ test__muldf3(0x3ff0000000000001, 0xbff0000000000002, 0xbff0000000000003);
+ status |=
+ test__muldf3(0x3ff0000000000002, 0x3ff0000000000001, 0x3ff0000000000003);
+ status |=
+ test__muldf3(0x3ff0000000000002, 0x7feffffffffffffe, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x3ff0000000000001, 0x7feffffffffffffe, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x4000000000000000, 0x0010000000000000, 0x0020000000000000);
+ status |=
+ test__muldf3(0x4000000000000000, 0x0010000000000001, 0x0020000000000001);
+ status |=
+ test__muldf3(0x4000000000000000, 0x3ff0000000000000, 0x4000000000000000);
+ status |=
+ test__muldf3(0x4000000000000000, 0x4008000000000000, 0x4018000000000000);
+ status |=
+ test__muldf3(0x4000000000000000, 0x7fd0000000000000, 0x7fe0000000000000);
+ status |=
+ test__muldf3(0x4000000000000000, 0x7fdfffffffffffff, 0x7fefffffffffffff);
+ status |=
+ test__muldf3(0x4000000000000000, 0x800ffffffffffffd, 0x801ffffffffffffa);
+ status |=
+ test__muldf3(0x4000000000000000, 0x8010000000000003, 0x8020000000000003);
+ status |=
+ test__muldf3(0x4000000000000000, 0x8010000000000005, 0x8020000000000005);
+ status |=
+ test__muldf3(0x4000000000000000, 0xbff0000000000000, 0xc000000000000000);
+ status |=
+ test__muldf3(0x4000000000000000, 0xffcffffffffffffd, 0xffdffffffffffffd);
+ status |=
+ test__muldf3(0x4000000000000000, 0xffd0000000000003, 0xffe0000000000003);
+ status |=
+ test__muldf3(0x4007ffffffffffff, 0x3feffffffffffffd, 0x4007fffffffffffd);
+ status |=
+ test__muldf3(0x4007ffffffffffff, 0x3feffffffffffffe, 0x4007fffffffffffe);
+ status |=
+ test__muldf3(0x4007ffffffffffff, 0x3fefffffffffffff, 0x4007fffffffffffe);
+ status |=
+ test__muldf3(0x4007ffffffffffff, 0xbfeffffffffffffd, 0xc007fffffffffffd);
+ status |=
+ test__muldf3(0x4008000000000000, 0x0000000000000002, 0x0000000000000006);
+ status |=
+ test__muldf3(0x4008000000000000, 0x4000000000000000, 0x4018000000000000);
+ status |=
+ test__muldf3(0x4008000000000000, 0x4008000000000000, 0x4022000000000000);
+ status |=
+ test__muldf3(0x4008000000000000, 0xc000000000000000, 0xc018000000000000);
+ status |=
+ test__muldf3(0x4008000000000001, 0x3ff0000000000001, 0x4008000000000003);
+ status |=
+ test__muldf3(0x4008000000000001, 0x3ff0000000000003, 0x4008000000000006);
+ status |=
+ test__muldf3(0x4008000000000001, 0xbff0000000000003, 0xc008000000000006);
+ status |=
+ test__muldf3(0x4010000000000000, 0x0000000000000002, 0x0000000000000008);
+ status |=
+ test__muldf3(0x4010000000000000, 0x7fcfffffffffffff, 0x7fefffffffffffff);
+ status |=
+ test__muldf3(0x4010000000000000, 0xffcfffffffffffff, 0xffefffffffffffff);
+ status |=
+ test__muldf3(0x4013ffffffffffff, 0x3fefffffffffffff, 0x4013fffffffffffe);
+ status |=
+ test__muldf3(0x4014000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x4014000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x4014000000000001, 0x3ff0000000000001, 0x4014000000000002);
+ status |=
+ test__muldf3(0x401bffffffffffff, 0x3feffffffffffffc, 0x401bfffffffffffc);
+ status |=
+ test__muldf3(0x401bffffffffffff, 0x3fefffffffffffff, 0x401bfffffffffffe);
+ status |=
+ test__muldf3(0x401c000000000000, 0x8000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x401c000000000000, 0xfff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x401c000000000001, 0x3ff0000000000001, 0x401c000000000003);
+ status |=
+ test__muldf3(0x7fcffffffffffffd, 0x4010000000000000, 0x7feffffffffffffd);
+ status |=
+ test__muldf3(0x7fcffffffffffffd, 0xc010000000000000, 0xffeffffffffffffd);
+ status |=
+ test__muldf3(0x7fd0000000000000, 0xc000000000000000, 0xffe0000000000000);
+ status |=
+ test__muldf3(0x7fdffffffffffffd, 0xc000000000000008, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7fdfffffffffffff, 0xc000000000000000, 0xffefffffffffffff);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0x0000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0x4000000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0x7fe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0x7feffffffffffffe, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0xffd0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0xffd0000000000004, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000000, 0xffe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000009, 0x7feffffffffffffa, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7fe0000000000009, 0xc018000000000002, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7fefffffffffffff, 0x0000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x000fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x001fffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x3ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x7fdfffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x7ff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x8000000000000002, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x800fffffffffffff, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x8010000000000001, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x8020000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0xc008000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0xffe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0xffefffffffffffff, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0xfff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x4018000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x7fefffffffffffff, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x8000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x8000000000000004, 0x0000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x8010000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0xc020000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0xffd0000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x8000000000000001, 0x0000000000000001, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8000000000000001, 0x4014000000000000, 0x8000000000000005);
+ status |=
+ test__muldf3(0x8000000000000002, 0x3ff0000000000000, 0x8000000000000002);
+ status |=
+ test__muldf3(0x8000000000000003, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8000000000000003, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x8000000000000004, 0xbff0000000000000, 0x0000000000000004);
+ status |=
+ test__muldf3(0x8000000000000008, 0x3fc0000000000000, 0x8000000000000001);
+ status |=
+ test__muldf3(0x800ffffffffffff7, 0x0020000000000003, 0x8000000000000000);
+ status |=
+ test__muldf3(0x800ffffffffffff7, 0x3ff0000000000001, 0x800ffffffffffff8);
+ status |=
+ test__muldf3(0x800ffffffffffffd, 0xc000000000000000, 0x001ffffffffffffa);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x3ff0000000000001, 0x8010000000000000);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x800ffffffffffffe, 0x0000000000000000);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0xbff0000000000000, 0x000fffffffffffff);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x8010000000000000, 0x0010000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8010000000000000, 0x8010000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x8010000000000001, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8010000000000001, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0x8010000000000001, 0xbff0000000000000, 0x0010000000000001);
+ status |=
+ test__muldf3(0x801ffffffffffffc, 0x3fe0000000000000, 0x800ffffffffffffe);
+ status |=
+ test__muldf3(0x801ffffffffffffc, 0xbfe0000000000000, 0x000ffffffffffffe);
+ status |=
+ test__muldf3(0x801ffffffffffffe, 0x3ff0000000000000, 0x801ffffffffffffe);
+ status |=
+ test__muldf3(0x801fffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0x801fffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x8020000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0x8020000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xbfefffffffffffff, 0xffefffffffffffff, 0x7feffffffffffffe);
+ status |=
+ test__muldf3(0xbff0000000000000, 0x0000000000000009, 0x8000000000000009);
+ status |=
+ test__muldf3(0xbff0000000000000, 0x0010000000000009, 0x8010000000000009);
+ status |=
+ test__muldf3(0xbff0000000000000, 0x3ff0000000000000, 0xbff0000000000000);
+ status |=
+ test__muldf3(0xbff0000000000000, 0x4000000000000000, 0xc000000000000000);
+ status |=
+ test__muldf3(0xbff0000000000000, 0xbff0000000000000, 0x3ff0000000000000);
+ status |=
+ test__muldf3(0xbff0000000000000, 0xc000000000000000, 0x4000000000000000);
+ status |=
+ test__muldf3(0xbff0000000000001, 0x3ff0000000000001, 0xbff0000000000002);
+ status |=
+ test__muldf3(0xbff0000000000001, 0xbff0000000000001, 0x3ff0000000000002);
+ status |=
+ test__muldf3(0xbff0000000000001, 0xbff0000000000002, 0x3ff0000000000003);
+ status |=
+ test__muldf3(0xbff0000000000002, 0x3ff0000000000001, 0xbff0000000000003);
+ status |=
+ test__muldf3(0xbff0000000000002, 0xbff0000000000001, 0x3ff0000000000003);
+ status |=
+ test__muldf3(0xc000000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0xc000000000000000, 0x000ffffffffffffd, 0x801ffffffffffffa);
+ status |=
+ test__muldf3(0xc000000000000000, 0x0010000000000001, 0x8020000000000001);
+ status |=
+ test__muldf3(0xc000000000000000, 0x0010000000000005, 0x8020000000000005);
+ status |=
+ test__muldf3(0xc000000000000000, 0x0010000000000009, 0x8020000000000009);
+ status |=
+ test__muldf3(0xc000000000000000, 0x4008000000000000, 0xc018000000000000);
+ status |=
+ test__muldf3(0xc000000000000000, 0x7fcfffffffffffff, 0xffdfffffffffffff);
+ status |=
+ test__muldf3(0xc000000000000000, 0x7fd0000000000001, 0xffe0000000000001);
+ status |=
+ test__muldf3(0xc000000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xc000000000000000, 0xbff0000000000000, 0x4000000000000000);
+ status |=
+ test__muldf3(0xc000000000000000, 0xc008000000000000, 0x4018000000000000);
+ status |=
+ test__muldf3(0xc007fffffffffffe, 0x7fe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xc007ffffffffffff, 0x3fefffffffffffff, 0xc007fffffffffffe);
+ status |=
+ test__muldf3(0xc008000000000000, 0x4008000000000000, 0xc022000000000000);
+ status |=
+ test__muldf3(0xc008000000000000, 0xc000000000000000, 0x4018000000000000);
+ status |=
+ test__muldf3(0xc008000000000000, 0xc008000000000000, 0x4022000000000000);
+ status |=
+ test__muldf3(0xc008000000000000, 0xffe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xc008000000000001, 0x3ff0000000000001, 0xc008000000000003);
+ status |=
+ test__muldf3(0xc010000000000000, 0x7fcfffffffffffff, 0xffefffffffffffff);
+ status |=
+ test__muldf3(0xc010000000000000, 0x8000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0xc010000000000000, 0xffcfffffffffffff, 0x7fefffffffffffff);
+ status |=
+ test__muldf3(0xc010000000000000, 0xfff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xc013fffffffffffe, 0xffe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xc013ffffffffffff, 0xbfefffffffffffff, 0x4013fffffffffffe);
+ status |=
+ test__muldf3(0xc014000000000001, 0xbff0000000000001, 0x4014000000000002);
+ status |=
+ test__muldf3(0xc01bfffffffffff9, 0x7fe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xc022000000000000, 0x7fe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xc022000000000001, 0xffe0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xffcffffffffffff9, 0x7fe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xffcffffffffffff9, 0xc00fffffffffffff, 0x7feffffffffffff8);
+ status |=
+ test__muldf3(0xffcffffffffffffd, 0x4010000000000000, 0xffeffffffffffffd);
+ status |=
+ test__muldf3(0xffcffffffffffffd, 0xc010000000000000, 0x7feffffffffffffd);
+ status |=
+ test__muldf3(0xffcfffffffffffff, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0xffcfffffffffffff, 0x4000000000000001, 0xffe0000000000000);
+ status |=
+ test__muldf3(0xffcfffffffffffff, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xffd0000000000000, 0x0000000000000000, 0x8000000000000000);
+ status |=
+ test__muldf3(0xffd0000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xffdffffffffffff7, 0x7fd0000000000001, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xffdfffffffffffff, 0x3ff0000000000001, 0xffe0000000000000);
+ status |=
+ test__muldf3(0xffdfffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0xffe0000000000005, 0xffe0000000000001, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xffeffffffffffffd, 0x7fe0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xffeffffffffffffd, 0xc008000000000001, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xffeffffffffffffd, 0xffe0000000000001, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xffefffffffffffff, 0x8000000000000000, 0x0000000000000000);
+ status |=
+ test__muldf3(0xffefffffffffffff, 0xffefffffffffffff, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xffefffffffffffff, 0xfff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0x4018000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0x7ff0000000000000, 0xfff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0x8000000000000004, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0x8010000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0xc020000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0xffd0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0xfff0000000000000, 0xfff0000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x002ffffffe000000, 0x3fcffffffffffffd, 0x000ffffffeffffff);
+ status |=
+ test__muldf3(0xbfeffeffffffffff, 0x8010000000000100, 0x000fff80000000ff);
+ status |=
+ test__muldf3(0x802ffffffe000000, 0x3fcffffffffffffd, 0x800ffffffeffffff);
+ status |=
+ test__muldf3(0xbfeffeffffffffff, 0x0010000000000100, 0x800fff80000000ff);
+ status |=
+ test__muldf3(0xbf9e8325a5aa6c8d, 0xbf9e8325a5aa6c8d, 0x3f4d180013083955);
+ status |=
+ test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fe4000000000000, 0x3ff237a6f271c5c4);
+ status |=
+ test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fe4000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201d25d7ea4fa2d4, 0x1fd4000000000000, 0x00091bd37938e2e2);
+ status |=
+ test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fe8000000000000, 0x3ff5dc61efbbba1f);
+ status |=
+ test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fe8000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201d25d7ea4fa2d4, 0x1fd8000000000000, 0x000aee30f7dddd10);
+ status |=
+ test__muldf3(0x3ffd25d7ea4fa2d4, 0x3fec000000000000, 0x3ff9811ced05ae7a);
+ status |=
+ test__muldf3(0x6ffd25d7ea4fa2d4, 0x4fec000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201d25d7ea4fa2d4, 0x1fdc000000000000, 0x000cc08e7682d73d);
+ status |=
+ test__muldf3(0x3ff265f139b6c87c, 0x3ff7000000000000, 0x3ffa728ac2f6c032);
+ status |=
+ test__muldf3(0x6ff265f139b6c87c, 0x4ff7000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201265f139b6c87c, 0x1fe7000000000000, 0x000d3945617b6019);
+ status |=
+ test__muldf3(0x3ff265f139b6c87c, 0x3ff5000000000000, 0x3ff825cc9bbfe723);
+ status |=
+ test__muldf3(0x6ff265f139b6c87c, 0x4ff5000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201265f139b6c87c, 0x1fe5000000000000, 0x000c12e64ddff391);
+ status |=
+ test__muldf3(0x3ffe5ab1dc9f12f9, 0x3ff0c1a10c80f0b7, 0x3fffca09666ab16e);
+ status |=
+ test__muldf3(0x6ffe5ab1dc9f12f9, 0x4ff0c1a10c80f0b7, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201e5ab1dc9f12f9, 0x1fe0c1a10c80f0b7, 0x000fe504b33558b7);
+ status |=
+ test__muldf3(0x3ffe5ab1dc9f12f9, 0x3fe73e5ef37f0f49, 0x3ff60c59a0917f00);
+ status |=
+ test__muldf3(0x6ffe5ab1dc9f12f9, 0x4fe73e5ef37f0f49, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201e5ab1dc9f12f9, 0x1fd73e5ef37f0f49, 0x000b062cd048bf80);
+ status |=
+ test__muldf3(0x3ffe5ab1dc9f12f9, 0x3fe8c1a10c80f0b7, 0x3ff77bb12a5d1d75);
+ status |=
+ test__muldf3(0x6ffe5ab1dc9f12f9, 0x4fe8c1a10c80f0b7, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201e5ab1dc9f12f9, 0x1fd8c1a10c80f0b7, 0x000bbdd8952e8ebb);
+ status |=
+ test__muldf3(0x3ffc6be665de3b1d, 0x3fe52d156619a0cb, 0x3ff2ced9f056fba8);
+ status |=
+ test__muldf3(0x6ffc6be665de3b1d, 0x4fe52d156619a0cb, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201c6be665de3b1d, 0x1fd52d156619a0cb, 0x0009676cf82b7dd4);
+ status |=
+ test__muldf3(0x3ffc6be665de3b1d, 0x3fead2ea99e65f35, 0x3ff7d2ffa8765d03);
+ status |=
+ test__muldf3(0x6ffc6be665de3b1d, 0x4fead2ea99e65f35, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201c6be665de3b1d, 0x1fdad2ea99e65f35, 0x000be97fd43b2e82);
+ status |=
+ test__muldf3(0x3ff1c0635d3cd39d, 0x3ff5c9b956d0b54b, 0x3ff82c50eb71ac34);
+ status |=
+ test__muldf3(0x6ff1c0635d3cd39d, 0x4ff5c9b956d0b54b, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x2011c0635d3cd39d, 0x1fe5c9b956d0b54b, 0x000c162875b8d61a);
+ status |=
+ test__muldf3(0x3ff1c0635d3cd39d, 0x3ff23646a92f4ab5, 0x3ff434a77da664d4);
+ status |=
+ test__muldf3(0x6ff1c0635d3cd39d, 0x4ff23646a92f4ab5, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x2011c0635d3cd39d, 0x1fe23646a92f4ab5, 0x000a1a53bed3326a);
+ status |=
+ test__muldf3(0x3ff1c0635d3cd39d, 0x3ffa3646a92f4ab5, 0x3ffd14d92c44cea3);
+ status |=
+ test__muldf3(0x6ff1c0635d3cd39d, 0x4ffa3646a92f4ab5, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x2011c0635d3cd39d, 0x1fea3646a92f4ab5, 0x000e8a6c96226751);
+ status |=
+ test__muldf3(0x3ff1c0635d3cd39d, 0x3ff1c9b956d0b54b, 0x3ff3bc381422774d);
+ status |=
+ test__muldf3(0x6ff1c0635d3cd39d, 0x4ff1c9b956d0b54b, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x2011c0635d3cd39d, 0x1fe1c9b956d0b54b, 0x0009de1c0a113ba6);
+ status |=
+ test__muldf3(0x3ff907065fd11389, 0x3fe46bad37af52b9, 0x3feff135e5756ec7);
+ status |=
+ test__muldf3(0x6ff907065fd11389, 0x4fe46bad37af52b9, 0x7feff135e5756ec7);
+ status |=
+ test__muldf3(0x201907065fd11389, 0x1fd46bad37af52b9, 0x0007fc4d795d5bb2);
+ status |=
+ test__muldf3(0x3ff907065fd11389, 0x3feb9452c850ad47, 0x3ff591ee9cfee5ea);
+ status |=
+ test__muldf3(0x6ff907065fd11389, 0x4feb9452c850ad47, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201907065fd11389, 0x1fdb9452c850ad47, 0x000ac8f74e7f72f5);
+ status |=
+ test__muldf3(0x3ff761c03e198df7, 0x3fe7f47c731d43c7, 0x3ff180e675617e83);
+ status |=
+ test__muldf3(0x6ff761c03e198df7, 0x4fe7f47c731d43c7, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201761c03e198df7, 0x1fd7f47c731d43c7, 0x0008c0733ab0bf41);
+ status |=
+ test__muldf3(0x3ffce6d1246c46fb, 0x3ff0b3469ded2bcd, 0x3ffe2aa6f74c0ffd);
+ status |=
+ test__muldf3(0x6ffce6d1246c46fb, 0x4ff0b3469ded2bcd, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201ce6d1246c46fb, 0x1fe0b3469ded2bcd, 0x000f15537ba607fe);
+ status |=
+ test__muldf3(0x3ffd5701100ec79d, 0x3fee654fee13094b, 0x3ffbde74e37bb583);
+ status |=
+ test__muldf3(0x6ffd5701100ec79d, 0x4fee654fee13094b, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201d5701100ec79d, 0x1fde654fee13094b, 0x000def3a71bddac1);
+ status |=
+ test__muldf3(0x3ffce1a06e8bcfd3, 0x3ff01c54436a605b, 0x3ffd14c361885d61);
+ status |=
+ test__muldf3(0x6ffce1a06e8bcfd3, 0x4ff01c54436a605b, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201ce1a06e8bcfd3, 0x1fe01c54436a605b, 0x000e8a61b0c42eb0);
+ status |=
+ test__muldf3(0x3ff21d1a5ca518a5, 0x3ff29f0ce1150f2d, 0x3ff514cd72d743f2);
+ status |=
+ test__muldf3(0x6ff21d1a5ca518a5, 0x4ff29f0ce1150f2d, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x20121d1a5ca518a5, 0x1fe29f0ce1150f2d, 0x000a8a66b96ba1f9);
+ status |=
+ test__muldf3(0x3ff031a98dbf97ba, 0x3ff4000000000000, 0x3ff43e13f12f7da8);
+ status |=
+ test__muldf3(0x6ff031a98dbf97ba, 0x4ff4000000000000, 0x7ff0000000000000);
+ status |=
+ test__muldf3(0x201031a98dbf97ba, 0x1fe4000000000000, 0x000a1f09f897bed4);
+ status |=
+ test__muldf3(0x0000000000000003, 0xc00fffffffffffff, 0x800000000000000c);
+ status |=
+ test__muldf3(0x0000000000000003, 0x400fffffffffffff, 0x000000000000000c);
+ status |=
+ test__muldf3(0x8000000000000003, 0xc00fffffffffffff, 0x000000000000000c);
+ status |=
+ test__muldf3(0x8000000000000003, 0x400fffffffffffff, 0x800000000000000c);
+ status |=
+ test__muldf3(0x0000000000000003, 0xc00ffffffffffffd, 0x800000000000000c);
+ status |=
+ test__muldf3(0x0000000000000003, 0x400ffffffffffffd, 0x000000000000000c);
+ status |=
+ test__muldf3(0x8000000000000003, 0xc00ffffffffffffd, 0x000000000000000c);
+ status |=
+ test__muldf3(0x8000000000000003, 0x400ffffffffffffd, 0x800000000000000c);
+ status |=
+ test__muldf3(0x1e51f703ee090000, 0x1e5c8000e4000000, 0x0000000000000001);
+ status |=
+ test__muldf3(0x1e561ed9745fdb21, 0x1e57255ca25b68e1, 0x0000000000000001);
+ status |=
+ test__muldf3(0x7feffffffff00000, 0xc000000000080000, 0xfff0000000000000);
// Test that the result of an operation is a NaN at all when it should be.
//
@@ -371,13 +688,20 @@ int main(void) {
// encoding. We also use the same value as the input NaN in tests that have
// one, so that even in EXPECT_EXACT_RESULTS mode these tests should pass,
// because 0x7ff8000000000000 is still the exact expected NaN.
- status |= test__muldf3(0x7ff0000000000000, 0x0000000000000000, 0x7ff8000000000000);
- status |= test__muldf3(0x7ff0000000000000, 0x8000000000000000, 0x7ff8000000000000);
- status |= test__muldf3(0x8000000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
- status |= test__muldf3(0x8000000000000000, 0xfff0000000000000, 0x7ff8000000000000);
- status |= test__muldf3(0x3ff0000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
- status |= test__muldf3(0x7ff8000000000000, 0x3ff0000000000000, 0x7ff8000000000000);
- status |= test__muldf3(0x7ff8000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x0000000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x8000000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0x7ff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x8000000000000000, 0xfff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x7ff8000000000000, 0x3ff0000000000000, 0x7ff8000000000000);
+ status |=
+ test__muldf3(0x7ff8000000000000, 0x7ff8000000000000, 0x7ff8000000000000);
#ifdef ARM_NAN_HANDLING
// Tests specific to the NaN handling of Arm hardware, mimicked by
@@ -397,58 +721,110 @@ int main(void) {
//
// - invalid operations not involving an input NaN return the quiet
// NaN with fewest bits set, 0x7ff8000000000000.
- status |= test__muldf3(0x0000000000000000, 0x7ff3758244400801, 0x7ffb758244400801);
- status |= test__muldf3(0x0000000000000000, 0x7fff44d3f65148af, 0x7fff44d3f65148af);
- status |= test__muldf3(0x0000000000000001, 0x7ff48607b4b37057, 0x7ffc8607b4b37057);
- status |= test__muldf3(0x0000000000000001, 0x7ff855f2d435b33d, 0x7ff855f2d435b33d);
- status |= test__muldf3(0x000fffffffffffff, 0x7ff169269a674e13, 0x7ff969269a674e13);
- status |= test__muldf3(0x000fffffffffffff, 0x7ffc80978b2ef0da, 0x7ffc80978b2ef0da);
- status |= test__muldf3(0x3ff0000000000000, 0x7ff3458ad034593d, 0x7ffb458ad034593d);
- status |= test__muldf3(0x3ff0000000000000, 0x7ffdd8bb98c9f13a, 0x7ffdd8bb98c9f13a);
- status |= test__muldf3(0x7fefffffffffffff, 0x7ff79a8b96250a98, 0x7fff9a8b96250a98);
- status |= test__muldf3(0x7fefffffffffffff, 0x7ffdcc675b63bb94, 0x7ffdcc675b63bb94);
- status |= test__muldf3(0x7ff0000000000000, 0x7ff018cfaf4d0fff, 0x7ff818cfaf4d0fff);
- status |= test__muldf3(0x7ff0000000000000, 0x7ff83ad1ab4dfd24, 0x7ff83ad1ab4dfd24);
- status |= test__muldf3(0x7ff48ce6c0cdd5ac, 0x0000000000000000, 0x7ffc8ce6c0cdd5ac);
- status |= test__muldf3(0x7ff08a34f3d5385b, 0x0000000000000001, 0x7ff88a34f3d5385b);
- status |= test__muldf3(0x7ff0a264c1c96281, 0x000fffffffffffff, 0x7ff8a264c1c96281);
- status |= test__muldf3(0x7ff77ce629e61f0e, 0x3ff0000000000000, 0x7fff7ce629e61f0e);
- status |= test__muldf3(0x7ff715e2d147fd76, 0x7fefffffffffffff, 0x7fff15e2d147fd76);
- status |= test__muldf3(0x7ff689a2031f1781, 0x7ff0000000000000, 0x7ffe89a2031f1781);
- status |= test__muldf3(0x7ff5dfb4a0c8cd05, 0x7ff11c1fe9793a33, 0x7ffddfb4a0c8cd05);
- status |= test__muldf3(0x7ff5826283ffb5d7, 0x7fff609b83884e81, 0x7ffd826283ffb5d7);
- status |= test__muldf3(0x7ff7cb03f2e61d42, 0x8000000000000000, 0x7fffcb03f2e61d42);
- status |= test__muldf3(0x7ff2adc8dfe72c96, 0x8000000000000001, 0x7ffaadc8dfe72c96);
- status |= test__muldf3(0x7ff4fc0bacc707f2, 0x800fffffffffffff, 0x7ffcfc0bacc707f2);
- status |= test__muldf3(0x7ff76248c8c9a619, 0xbff0000000000000, 0x7fff6248c8c9a619);
- status |= test__muldf3(0x7ff367972fce131b, 0xffefffffffffffff, 0x7ffb67972fce131b);
- status |= test__muldf3(0x7ff188f5ac284e92, 0xfff0000000000000, 0x7ff988f5ac284e92);
- status |= test__muldf3(0x7ffed4c22e4e569d, 0x0000000000000000, 0x7ffed4c22e4e569d);
- status |= test__muldf3(0x7ffe95105fa3f339, 0x0000000000000001, 0x7ffe95105fa3f339);
- status |= test__muldf3(0x7ffb8d33dbb9ecfb, 0x000fffffffffffff, 0x7ffb8d33dbb9ecfb);
- status |= test__muldf3(0x7ff874e41dc63e07, 0x3ff0000000000000, 0x7ff874e41dc63e07);
- status |= test__muldf3(0x7ffe27594515ecdf, 0x7fefffffffffffff, 0x7ffe27594515ecdf);
- status |= test__muldf3(0x7ffeac86d5c69bdf, 0x7ff0000000000000, 0x7ffeac86d5c69bdf);
- status |= test__muldf3(0x7ff97d657b99f76f, 0x7ff7e4149862a796, 0x7fffe4149862a796);
- status |= test__muldf3(0x7ffad17c6aa33fad, 0x7ffd898893ad4d28, 0x7ffad17c6aa33fad);
- status |= test__muldf3(0x7ff96e04e9c3d173, 0x8000000000000000, 0x7ff96e04e9c3d173);
- status |= test__muldf3(0x7ffec01ad8da3abb, 0x8000000000000001, 0x7ffec01ad8da3abb);
- status |= test__muldf3(0x7ffd1d565c495941, 0x800fffffffffffff, 0x7ffd1d565c495941);
- status |= test__muldf3(0x7ffe3d24f1e474a7, 0xbff0000000000000, 0x7ffe3d24f1e474a7);
- status |= test__muldf3(0x7ffc206f2bb8c8ce, 0xffefffffffffffff, 0x7ffc206f2bb8c8ce);
- status |= test__muldf3(0x7ff93efdecfb7d3b, 0xfff0000000000000, 0x7ff93efdecfb7d3b);
- status |= test__muldf3(0x8000000000000000, 0x7ff2ee725d143ac5, 0x7ffaee725d143ac5);
- status |= test__muldf3(0x8000000000000000, 0x7ffbba26e5c5fe98, 0x7ffbba26e5c5fe98);
- status |= test__muldf3(0x8000000000000001, 0x7ff7818a1cd26df9, 0x7fff818a1cd26df9);
- status |= test__muldf3(0x8000000000000001, 0x7ffaee6cc63b5292, 0x7ffaee6cc63b5292);
- status |= test__muldf3(0x800fffffffffffff, 0x7ff401096edaf79d, 0x7ffc01096edaf79d);
- status |= test__muldf3(0x800fffffffffffff, 0x7ffbf1778c7a2e59, 0x7ffbf1778c7a2e59);
- status |= test__muldf3(0xbff0000000000000, 0x7ff2e8fb0201c496, 0x7ffae8fb0201c496);
- status |= test__muldf3(0xbff0000000000000, 0x7ffcb6a5adb2e154, 0x7ffcb6a5adb2e154);
- status |= test__muldf3(0xffefffffffffffff, 0x7ff1ea1bfc15d71d, 0x7ff9ea1bfc15d71d);
- status |= test__muldf3(0xffefffffffffffff, 0x7ffae0766e21efc0, 0x7ffae0766e21efc0);
- status |= test__muldf3(0xfff0000000000000, 0x7ff3b364cffbdfe6, 0x7ffbb364cffbdfe6);
- status |= test__muldf3(0xfff0000000000000, 0x7ffd0d3223334ae3, 0x7ffd0d3223334ae3);
+ status |=
+ test__muldf3(0x0000000000000000, 0x7ff3758244400801, 0x7ffb758244400801);
+ status |=
+ test__muldf3(0x0000000000000000, 0x7fff44d3f65148af, 0x7fff44d3f65148af);
+ status |=
+ test__muldf3(0x0000000000000001, 0x7ff48607b4b37057, 0x7ffc8607b4b37057);
+ status |=
+ test__muldf3(0x0000000000000001, 0x7ff855f2d435b33d, 0x7ff855f2d435b33d);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x7ff169269a674e13, 0x7ff969269a674e13);
+ status |=
+ test__muldf3(0x000fffffffffffff, 0x7ffc80978b2ef0da, 0x7ffc80978b2ef0da);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x7ff3458ad034593d, 0x7ffb458ad034593d);
+ status |=
+ test__muldf3(0x3ff0000000000000, 0x7ffdd8bb98c9f13a, 0x7ffdd8bb98c9f13a);
+ status |=
+ test__muldf3(0x7fefffffffffffff, 0x7ff79a8b96250a98, 0x7fff9a8b96250a98);
+ status |=
+ test__muldf3(0x7fefffffffffffff, 0x7ffdcc675b63bb94, 0x7ffdcc675b63bb94);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x7ff018cfaf4d0fff, 0x7ff818cfaf4d0fff);
+ status |=
+ test__muldf3(0x7ff0000000000000, 0x7ff83ad1ab4dfd24, 0x7ff83ad1ab4dfd24);
+ status |=
+ test__muldf3(0x7ff48ce6c0cdd5ac, 0x0000000000000000, 0x7ffc8ce6c0cdd5ac);
+ status |=
+ test__muldf3(0x7ff08a34f3d5385b, 0x0000000000000001, 0x7ff88a34f3d5385b);
+ status |=
+ test__muldf3(0x7ff0a264c1c96281, 0x000fffffffffffff, 0x7ff8a264c1c96281);
+ status |=
+ test__muldf3(0x7ff77ce629e61f0e, 0x3ff0000000000000, 0x7fff7ce629e61f0e);
+ status |=
+ test__muldf3(0x7ff715e2d147fd76, 0x7fefffffffffffff, 0x7fff15e2d147fd76);
+ status |=
+ test__muldf3(0x7ff689a2031f1781, 0x7ff0000000000000, 0x7ffe89a2031f1781);
+ status |=
+ test__muldf3(0x7ff5dfb4a0c8cd05, 0x7ff11c1fe9793a33, 0x7ffddfb4a0c8cd05);
+ status |=
+ test__muldf3(0x7ff5826283ffb5d7, 0x7fff609b83884e81, 0x7ffd826283ffb5d7);
+ status |=
+ test__muldf3(0x7ff7cb03f2e61d42, 0x8000000000000000, 0x7fffcb03f2e61d42);
+ status |=
+ test__muldf3(0x7ff2adc8dfe72c96, 0x8000000000000001, 0x7ffaadc8dfe72c96);
+ status |=
+ test__muldf3(0x7ff4fc0bacc707f2, 0x800fffffffffffff, 0x7ffcfc0bacc707f2);
+ status |=
+ test__muldf3(0x7ff76248c8c9a619, 0xbff0000000000000, 0x7fff6248c8c9a619);
+ status |=
+ test__muldf3(0x7ff367972fce131b, 0xffefffffffffffff, 0x7ffb67972fce131b);
+ status |=
+ test__muldf3(0x7ff188f5ac284e92, 0xfff0000000000000, 0x7ff988f5ac284e92);
+ status |=
+ test__muldf3(0x7ffed4c22e4e569d, 0x0000000000000000, 0x7ffed4c22e4e569d);
+ status |=
+ test__muldf3(0x7ffe95105fa3f339, 0x0000000000000001, 0x7ffe95105fa3f339);
+ status |=
+ test__muldf3(0x7ffb8d33dbb9ecfb, 0x000fffffffffffff, 0x7ffb8d33dbb9ecfb);
+ status |=
+ test__muldf3(0x7ff874e41dc63e07, 0x3ff0000000000000, 0x7ff874e41dc63e07);
+ status |=
+ test__muldf3(0x7ffe27594515ecdf, 0x7fefffffffffffff, 0x7ffe27594515ecdf);
+ status |=
+ test__muldf3(0x7ffeac86d5c69bdf, 0x7ff0000000000000, 0x7ffeac86d5c69bdf);
+ status |=
+ test__muldf3(0x7ff97d657b99f76f, 0x7ff7e4149862a796, 0x7fffe4149862a796);
+ status |=
+ test__muldf3(0x7ffad17c6aa33fad, 0x7ffd898893ad4d28, 0x7ffad17c6aa33fad);
+ status |=
+ test__muldf3(0x7ff96e04e9c3d173, 0x8000000000000000, 0x7ff96e04e9c3d173);
+ status |=
+ test__muldf3(0x7ffec01ad8da3abb, 0x8000000000000001, 0x7ffec01ad8da3abb);
+ status |=
+ test__muldf3(0x7ffd1d565c495941, 0x800fffffffffffff, 0x7ffd1d565c495941);
+ status |=
+ test__muldf3(0x7ffe3d24f1e474a7, 0xbff0000000000000, 0x7ffe3d24f1e474a7);
+ status |=
+ test__muldf3(0x7ffc206f2bb8c8ce, 0xffefffffffffffff, 0x7ffc206f2bb8c8ce);
+ status |=
+ test__muldf3(0x7ff93efdecfb7d3b, 0xfff0000000000000, 0x7ff93efdecfb7d3b);
+ status |=
+ test__muldf3(0x8000000000000000, 0x7ff2ee725d143ac5, 0x7ffaee725d143ac5);
+ status |=
+ test__muldf3(0x8000000000000000, 0x7ffbba26e5c5fe98, 0x7ffbba26e5c5fe98);
+ status |=
+ test__muldf3(0x8000000000000001, 0x7ff7818a1cd26df9, 0x7fff818a1cd26df9);
+ status |=
+ test__muldf3(0x8000000000000001, 0x7ffaee6cc63b5292, 0x7ffaee6cc63b5292);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x7ff401096edaf79d, 0x7ffc01096edaf79d);
+ status |=
+ test__muldf3(0x800fffffffffffff, 0x7ffbf1778c7a2e59, 0x7ffbf1778c7a2e59);
+ status |=
+ test__muldf3(0xbff0000000000000, 0x7ff2e8fb0201c496, 0x7ffae8fb0201c496);
+ status |=
+ test__muldf3(0xbff0000000000000, 0x7ffcb6a5adb2e154, 0x7ffcb6a5adb2e154);
+ status |=
+ test__muldf3(0xffefffffffffffff, 0x7ff1ea1bfc15d71d, 0x7ff9ea1bfc15d71d);
+ status |=
+ test__muldf3(0xffefffffffffffff, 0x7ffae0766e21efc0, 0x7ffae0766e21efc0);
+ status |=
+ test__muldf3(0xfff0000000000000, 0x7ff3b364cffbdfe6, 0x7ffbb364cffbdfe6);
+ status |=
+ test__muldf3(0xfff0000000000000, 0x7ffd0d3223334ae3, 0x7ffd0d3223334ae3);
#endif // ARM_NAN_HANDLING
>From 46b08f4b409492dca56b16760aa90f2e297ccbb3 Mon Sep 17 00:00:00 2001
From: Simon Tatham <simon.tatham at arm.com>
Date: Tue, 24 Feb 2026 16:28:58 +0000
Subject: [PATCH 3/3] Update tests to match #179918
---
compiler-rt/test/builtins/Unit/divdf3new_test.c | 8 ++++----
compiler-rt/test/builtins/Unit/muldf3new_test.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/compiler-rt/test/builtins/Unit/divdf3new_test.c b/compiler-rt/test/builtins/Unit/divdf3new_test.c
index ca33e00a8741d..866c7cb08e519 100644
--- a/compiler-rt/test/builtins/Unit/divdf3new_test.c
+++ b/compiler-rt/test/builtins/Unit/divdf3new_test.c
@@ -16,7 +16,7 @@
// 0x7ff8000000000000. For the Arm optimized FP implementation, which commits
// to a more detailed handling of NaNs, we tighten up the check and include
// some extra test cases specific to that NaN policy.
-#if (__arm__ && !(__thumb__ && !__thumb2__)) && COMPILER_RT_ARM_OPTIMIZED_FP
+#if COMPILER_RT_ARM_OPTIMIZED_FP
# define EXPECT_EXACT_RESULTS
# define ARM_NAN_HANDLING
#endif
@@ -24,8 +24,8 @@
// Returns: a / b
COMPILER_RT_ABI double __divdf3(double a, double b);
-int test__divdf3(int line, uint64_t a_rep, uint64_t b_rep,
- uint64_t expected_rep) {
+int test__divdf3(uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep,
+ int line) {
double a = fromRep64(a_rep), b = fromRep64(b_rep);
double x = __divdf3(a, b);
#ifdef EXPECT_EXACT_RESULTS
@@ -42,7 +42,7 @@ int test__divdf3(int line, uint64_t a_rep, uint64_t b_rep,
return ret;
}
-#define test__divdf3(a, b, x) test__divdf3(__LINE__, a, b, x)
+#define test__divdf3(a, b, x) test__divdf3(a, b, x, __LINE__)
int main(void) {
int status = 0;
diff --git a/compiler-rt/test/builtins/Unit/muldf3new_test.c b/compiler-rt/test/builtins/Unit/muldf3new_test.c
index c2e39254fbc46..b8a5c64460696 100644
--- a/compiler-rt/test/builtins/Unit/muldf3new_test.c
+++ b/compiler-rt/test/builtins/Unit/muldf3new_test.c
@@ -16,7 +16,7 @@
// 0x7ff8000000000000. For the Arm optimized FP implementation, which commits
// to a more detailed handling of NaNs, we tighten up the check and include
// some extra test cases specific to that NaN policy.
-#if (__arm__ && !(__thumb__ && !__thumb2__)) && COMPILER_RT_ARM_OPTIMIZED_FP
+#if COMPILER_RT_ARM_OPTIMIZED_FP
# define EXPECT_EXACT_RESULTS
# define ARM_NAN_HANDLING
#endif
@@ -24,8 +24,8 @@
// Returns: a * b
COMPILER_RT_ABI double __muldf3(double a, double b);
-int test__muldf3(int line, uint64_t a_rep, uint64_t b_rep,
- uint64_t expected_rep) {
+int test__muldf3(uint64_t a_rep, uint64_t b_rep, uint64_t expected_rep,
+ int line) {
double a = fromRep64(a_rep), b = fromRep64(b_rep);
double x = __muldf3(a, b);
#ifdef EXPECT_EXACT_RESULTS
@@ -42,7 +42,7 @@ int test__muldf3(int line, uint64_t a_rep, uint64_t b_rep,
return ret;
}
-#define test__muldf3(a, b, x) test__muldf3(__LINE__, a, b, x)
+#define test__muldf3(a, b, x) test__muldf3(a, b, x, __LINE__)
int main(void) {
int status = 0;
More information about the llvm-branch-commits
mailing list