author | Jacob Bramley <Jacob.Bramley@arm.com> |
Thu, 23 Sep 2010 10:31:16 +0100 | |
changeset 54740 | f9a5fbc24118fdf25fe62ae443ac9dff88e03539 |
parent 54739 | caacc64334ca30e7e9310647618c9671be32fb5c |
child 54741 | df05d03542f711f92a9ea2faab04cd2b3f2af82c |
push id | 16011 |
push user | rsayre@mozilla.com |
push date | Wed, 29 Sep 2010 06:01:57 +0000 |
treeherder | mozilla-central@d7e659b4f80c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nnethercote |
bugs | 596545 |
milestone | 2.0b7pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/lirasm/lirasm.cpp +++ b/js/src/lirasm/lirasm.cpp @@ -374,23 +374,43 @@ double sinFn(double d) { return sin(d); } #define sin sinFn double calld1(double x, double i, double y, double l, double x1, double i1, double y1, double l1) { return x + i * y - l + x1 / i1 - y1 * l1; } +// The calling tests with mixed argument types are sensible for all platforms, but they highlight +// the differences between the supported ABIs on ARM. + +double callid1(int i, double x, double y, int j, int k, double z) { + return (x + y + z) / (double)(i + j + k); +} + +double callid2(int i, int j, int k, double x) { + return x / (double)(i + j + k); +} + +double callid3(int i, int j, double x, int k, double y, double z) { + return (x + y + z) / (double)(i + j + k); +} + Function functions[] = { FN(puts, CallInfo::typeSig1(ARGTYPE_I, ARGTYPE_P)), FN(sin, CallInfo::typeSig1(ARGTYPE_D, ARGTYPE_D)), FN(malloc, CallInfo::typeSig1(ARGTYPE_P, ARGTYPE_P)), FN(free, CallInfo::typeSig1(ARGTYPE_V, ARGTYPE_P)), FN(calld1, CallInfo::typeSig8(ARGTYPE_D, ARGTYPE_D, ARGTYPE_D, ARGTYPE_D, ARGTYPE_D, ARGTYPE_D, ARGTYPE_D, ARGTYPE_D, ARGTYPE_D)), + FN(callid1, CallInfo::typeSig6(ARGTYPE_D, ARGTYPE_I, ARGTYPE_D, ARGTYPE_D, + ARGTYPE_I, ARGTYPE_I, ARGTYPE_D)), + FN(callid2, CallInfo::typeSig4(ARGTYPE_D, ARGTYPE_I, ARGTYPE_I, ARGTYPE_I, ARGTYPE_D)), + FN(callid3, CallInfo::typeSig6(ARGTYPE_D, ARGTYPE_I, ARGTYPE_I, ARGTYPE_D, + ARGTYPE_I, ARGTYPE_D, ARGTYPE_D)), }; template<typename out, typename in> out lexical_cast(in arg) { stringstream tmp; out ret; if ((tmp << arg && tmp >> ret && tmp.eof()))
new file mode 100644 --- /dev/null +++ b/js/src/lirasm/tests/callid1.in @@ -0,0 +1,10 @@ +i = immi -1; +j = immi 3; +k = immi 6; +x = immd 1.1; +y = immd 3.3; +z = immd 4.4; + +res = calld callid1 cdecl i x y j k z +retd res +
new file mode 100644 --- /dev/null +++ b/js/src/lirasm/tests/callid1.out @@ -0,0 +1,1 @@ +Output is: 1.1
new file mode 100644 --- /dev/null +++ b/js/src/lirasm/tests/callid2.in @@ -0,0 +1,8 @@ +i = immi -1; +j = immi 3; +k = immi 6; +x = immd 8.8; + +res = calld callid2 cdecl i j k x +retd res +
new file mode 100644 --- /dev/null +++ b/js/src/lirasm/tests/callid2.out @@ -0,0 +1,1 @@ +Output is: 1.1