LEFT | RIGHT |
(no file at all) | |
1 // Inferno's libkern/vlrt-arm.c | 1 // Inferno's libkern/vlrt-arm.c |
2 // http://code.google.com/p/inferno-os/source/browse/libkern/vlrt-arm.c | 2 // http://code.google.com/p/inferno-os/source/browse/libkern/vlrt-arm.c |
3 // | 3 // |
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. |
5 // Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vita
nuova.com). All rights reserved. | 5 // Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vita
nuova.com). All rights reserved. |
6 // Portions Copyright 2009 The Go Authors. All rights reserved. | 6 // Portions Copyright 2009 The Go Authors. All rights reserved. |
7 // | 7 // |
8 // Permission is hereby granted, free of charge, to any person obtaining a copy | 8 // Permission is hereby granted, free of charge, to any person obtaining a copy |
9 // of this software and associated documentation files (the "Software"), to deal | 9 // of this software and associated documentation files (the "Software"), to deal |
10 // in the Software without restriction, including without limitation the rights | 10 // in the Software without restriction, including without limitation the rights |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 float | 190 float |
191 _v2f(Vlong x) | 191 _v2f(Vlong x) |
192 { | 192 { |
193 return _v2d(x); | 193 return _v2d(x); |
194 } | 194 } |
195 | 195 |
196 void | 196 void |
197 runtime·int64tofloat64(Vlong y, double d) | 197 runtime·int64tofloat64(Vlong y, double d) |
198 { | 198 { |
199 d = _v2d(y); | 199 d = _v2d(y); |
| 200 USED(&d); // FLUSH |
200 } | 201 } |
201 | 202 |
202 void | 203 void |
203 runtime·uint64tofloat64(Vlong y, double d) | 204 runtime·uint64tofloat64(Vlong y, double d) |
204 { | 205 { |
205 d = _ul2d(y.hi)*4294967296. + _ul2d(y.lo); | 206 d = _ul2d(y.hi)*4294967296. + _ul2d(y.lo); |
| 207 USED(&d); // FLUSH |
206 } | 208 } |
207 | 209 |
208 static void | 210 static void |
209 dodiv(Vlong num, Vlong den, Vlong *q, Vlong *r) | 211 dodiv(Vlong num, Vlong den, Vlong *q, Vlong *r) |
210 { | 212 { |
211 ulong numlo, numhi, denhi, denlo, quohi, quolo, t; | 213 ulong numlo, numhi, denhi, denlo, quohi, quolo, t; |
212 int i; | 214 int i; |
213 | 215 |
214 numhi = num.hi; | 216 numhi = num.hi; |
215 numlo = num.lo; | 217 numlo = num.lo; |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 return lv.hi > rv.hi || | 809 return lv.hi > rv.hi || |
808 (lv.hi == rv.hi && lv.lo > rv.lo); | 810 (lv.hi == rv.hi && lv.lo > rv.lo); |
809 } | 811 } |
810 | 812 |
811 int | 813 int |
812 _hsv(Vlong lv, Vlong rv) | 814 _hsv(Vlong lv, Vlong rv) |
813 { | 815 { |
814 return lv.hi > rv.hi || | 816 return lv.hi > rv.hi || |
815 (lv.hi == rv.hi && lv.lo >= rv.lo); | 817 (lv.hi == rv.hi && lv.lo >= rv.lo); |
816 } | 818 } |
LEFT | RIGHT |