Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | ! |
michael@0 | 2 | ! This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | ! License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | ! file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | ! |
michael@0 | 7 | ! double upper32(double /*frs1*/); |
michael@0 | 8 | ! |
michael@0 | 9 | .inline upper32,8 |
michael@0 | 10 | fdtox %f0,%f10 |
michael@0 | 11 | fitod %f10,%f0 |
michael@0 | 12 | .end |
michael@0 | 13 | |
michael@0 | 14 | ! |
michael@0 | 15 | ! double lower32(double /*frs1*/, double /* Zero */); |
michael@0 | 16 | ! |
michael@0 | 17 | .inline lower32,8 |
michael@0 | 18 | fdtox %f0,%f10 |
michael@0 | 19 | fmovs %f2,%f10 |
michael@0 | 20 | fxtod %f10,%f0 |
michael@0 | 21 | .end |
michael@0 | 22 | |
michael@0 | 23 | ! |
michael@0 | 24 | ! double mod(double /*x*/, double /*1/m*/, double /*m*/); |
michael@0 | 25 | ! |
michael@0 | 26 | .inline mod,12 |
michael@0 | 27 | fmuld %f0,%f2,%f2 |
michael@0 | 28 | fdtox %f2,%f2 |
michael@0 | 29 | fxtod %f2,%f2 |
michael@0 | 30 | fmuld %f2,%f4,%f2 |
michael@0 | 31 | fsubd %f0,%f2,%f0 |
michael@0 | 32 | .end |
michael@0 | 33 | |
michael@0 | 34 | |
michael@0 | 35 | ! |
michael@0 | 36 | ! void i16_to_d16_and_d32x4(double * /*1/(2^16)*/, double * /* 2^16*/, |
michael@0 | 37 | ! double * /* 0 */, |
michael@0 | 38 | ! double * /*result16*/, double * /* result32 */ |
michael@0 | 39 | ! float * /*source - should be unsigned int* |
michael@0 | 40 | ! converted to float* */); |
michael@0 | 41 | ! |
michael@0 | 42 | .inline i16_to_d16_and_d32x4,24 |
michael@0 | 43 | ldd [%o0],%f2 ! 1/(2^16) |
michael@0 | 44 | ldd [%o1],%f4 ! 2^16 |
michael@0 | 45 | ldd [%o2],%f22 |
michael@0 | 46 | |
michael@0 | 47 | fmovd %f22,%f6 |
michael@0 | 48 | ld [%o5],%f7 |
michael@0 | 49 | fmovd %f22,%f10 |
michael@0 | 50 | ld [%o5+4],%f11 |
michael@0 | 51 | fmovd %f22,%f14 |
michael@0 | 52 | ld [%o5+8],%f15 |
michael@0 | 53 | fmovd %f22,%f18 |
michael@0 | 54 | ld [%o5+12],%f19 |
michael@0 | 55 | fxtod %f6,%f6 |
michael@0 | 56 | std %f6,[%o4] |
michael@0 | 57 | fxtod %f10,%f10 |
michael@0 | 58 | std %f10,[%o4+8] |
michael@0 | 59 | fxtod %f14,%f14 |
michael@0 | 60 | std %f14,[%o4+16] |
michael@0 | 61 | fxtod %f18,%f18 |
michael@0 | 62 | std %f18,[%o4+24] |
michael@0 | 63 | fmuld %f2,%f6,%f8 |
michael@0 | 64 | fmuld %f2,%f10,%f12 |
michael@0 | 65 | fmuld %f2,%f14,%f16 |
michael@0 | 66 | fmuld %f2,%f18,%f20 |
michael@0 | 67 | fdtox %f8,%f8 |
michael@0 | 68 | fdtox %f12,%f12 |
michael@0 | 69 | fdtox %f16,%f16 |
michael@0 | 70 | fdtox %f20,%f20 |
michael@0 | 71 | fxtod %f8,%f8 |
michael@0 | 72 | std %f8,[%o3+8] |
michael@0 | 73 | fxtod %f12,%f12 |
michael@0 | 74 | std %f12,[%o3+24] |
michael@0 | 75 | fxtod %f16,%f16 |
michael@0 | 76 | std %f16,[%o3+40] |
michael@0 | 77 | fxtod %f20,%f20 |
michael@0 | 78 | std %f20,[%o3+56] |
michael@0 | 79 | fmuld %f8,%f4,%f8 |
michael@0 | 80 | fmuld %f12,%f4,%f12 |
michael@0 | 81 | fmuld %f16,%f4,%f16 |
michael@0 | 82 | fmuld %f20,%f4,%f20 |
michael@0 | 83 | fsubd %f6,%f8,%f8 |
michael@0 | 84 | std %f8,[%o3] |
michael@0 | 85 | fsubd %f10,%f12,%f12 |
michael@0 | 86 | std %f12,[%o3+16] |
michael@0 | 87 | fsubd %f14,%f16,%f16 |
michael@0 | 88 | std %f16,[%o3+32] |
michael@0 | 89 | fsubd %f18,%f20,%f20 |
michael@0 | 90 | std %f20,[%o3+48] |
michael@0 | 91 | .end |
michael@0 | 92 | |
michael@0 | 93 |