michael@0: ! michael@0: ! This Source Code Form is subject to the terms of the Mozilla Public michael@0: ! License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: ! file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: ! michael@0: ! double upper32(double /*frs1*/); michael@0: ! michael@0: .inline upper32,8 michael@0: std %o0,[%sp+0x48] michael@0: ldd [%sp+0x48],%f10 michael@0: michael@0: fdtox %f10,%f10 michael@0: fitod %f10,%f0 michael@0: .end michael@0: michael@0: ! michael@0: ! double lower32(double /*frs1*/, double /* Zero */); michael@0: ! michael@0: .inline lower32,8 michael@0: std %o0,[%sp+0x48] michael@0: ldd [%sp+0x48],%f10 michael@0: std %o2,[%sp+0x48] michael@0: ldd [%sp+0x48],%f12 michael@0: michael@0: fdtox %f10,%f10 michael@0: fmovs %f12,%f10 michael@0: fxtod %f10,%f0 michael@0: .end michael@0: michael@0: ! michael@0: ! double mod(double /*x*/, double /*1/m*/, double /*m*/); michael@0: ! michael@0: .inline mod,12 michael@0: std %o0,[%sp+0x48] michael@0: ldd [%sp+0x48],%f2 michael@0: std %o2,[%sp+0x48] michael@0: ldd [%sp+0x48],%f4 michael@0: std %o4,[%sp+0x48] michael@0: ldd [%sp+0x48],%f6 michael@0: michael@0: fmuld %f2,%f4,%f4 michael@0: fdtox %f4,%f4 michael@0: fxtod %f4,%f4 michael@0: fmuld %f4,%f6,%f4 michael@0: fsubd %f2,%f4,%f0 michael@0: .end michael@0: michael@0: michael@0: ! michael@0: ! void i16_to_d16_and_d32x4(double * /*1/(2^16)*/, double * /* 2^16*/, michael@0: ! double * /* 0 */, michael@0: ! double * /*result16*/, double * /* result32 */ michael@0: ! float * /*source - should be unsigned int* michael@0: ! converted to float* */); michael@0: ! michael@0: .inline i16_to_d16_and_d32x4,24 michael@0: ldd [%o0],%f2 ! 1/(2^16) michael@0: ldd [%o1],%f4 ! 2^16 michael@0: ldd [%o2],%f22 michael@0: michael@0: fmovd %f22,%f6 michael@0: ld [%o5],%f7 michael@0: fmovd %f22,%f10 michael@0: ld [%o5+4],%f11 michael@0: fmovd %f22,%f14 michael@0: ld [%o5+8],%f15 michael@0: fmovd %f22,%f18 michael@0: ld [%o5+12],%f19 michael@0: fxtod %f6,%f6 michael@0: std %f6,[%o4] michael@0: fxtod %f10,%f10 michael@0: std %f10,[%o4+8] michael@0: fxtod %f14,%f14 michael@0: std %f14,[%o4+16] michael@0: fxtod %f18,%f18 michael@0: std %f18,[%o4+24] michael@0: fmuld %f2,%f6,%f8 michael@0: fmuld %f2,%f10,%f12 michael@0: fmuld %f2,%f14,%f16 michael@0: fmuld %f2,%f18,%f20 michael@0: fdtox %f8,%f8 michael@0: fdtox %f12,%f12 michael@0: fdtox %f16,%f16 michael@0: fdtox %f20,%f20 michael@0: fxtod %f8,%f8 michael@0: std %f8,[%o3+8] michael@0: fxtod %f12,%f12 michael@0: std %f12,[%o3+24] michael@0: fxtod %f16,%f16 michael@0: std %f16,[%o3+40] michael@0: fxtod %f20,%f20 michael@0: std %f20,[%o3+56] michael@0: fmuld %f8,%f4,%f8 michael@0: fmuld %f12,%f4,%f12 michael@0: fmuld %f16,%f4,%f16 michael@0: fmuld %f20,%f4,%f20 michael@0: fsubd %f6,%f8,%f8 michael@0: std %f8,[%o3] michael@0: fsubd %f10,%f12,%f12 michael@0: std %f12,[%o3+16] michael@0: fsubd %f14,%f16,%f16 michael@0: std %f16,[%o3+32] michael@0: fsubd %f18,%f20,%f20 michael@0: std %f20,[%o3+48] michael@0: .end michael@0: michael@0: