From 303f0b0be6d00eb77532681708663c94beb45d86 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 16 Nov 2023 15:56:33 +0100 Subject: Made single and double FP register usage consistent. Worked around double to long handling in the _d2l function. --- libkern/vlrt-thumb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libkern/vlrt-thumb.c') diff --git a/libkern/vlrt-thumb.c b/libkern/vlrt-thumb.c index 58cf5591..e94ec2de 100644 --- a/libkern/vlrt-thumb.c +++ b/libkern/vlrt-thumb.c @@ -26,6 +26,12 @@ struct Vlong }; }; +struct RVlong +{ + ulong lo; + ulong hi; +}; + void abort(void); void @@ -54,14 +60,12 @@ _subv(Vlong *r, Vlong a, Vlong b) r->hi = hi; } - void _d2v(Vlong *y, double d) { - union { double d; struct Vlong; } x; + union { double d; struct RVlong; } x; ulong xhi, xlo, ylo, yhi; int sh; - x.d = d; xhi = (x.hi & 0xfffff) | 0x100000; -- cgit v1.2.3