diff options
| author | David Boddie <david@boddie.org.uk> | 2023-11-16 15:56:33 +0100 |
|---|---|---|
| committer | David Boddie <david@boddie.org.uk> | 2023-11-16 16:44:28 +0100 |
| commit | 303f0b0be6d00eb77532681708663c94beb45d86 (patch) | |
| tree | 74adc7e5baa4eedbf6a1c27dccef481e0cec3968 /libkern | |
| parent | 3cbc2622cf597a1d066793a87b7a6a22a2da4294 (diff) | |
Made single and double FP register usage consistent.
Worked around double to long handling in the _d2l function.
Diffstat (limited to 'libkern')
| -rw-r--r-- | libkern/vlrt-thumb.c | 10 |
1 files changed, 7 insertions, 3 deletions
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; |
