]>
git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/lazy-binding-reg-params/foo.c
2 * Copyright (c) 2005 Apple Computer p1, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
28 __attribute__((regparm(3)))
30 bool dointtest(int p1
, int p2
, int p3
, int p4
, int p5
)
45 #if __ppc__ || __ppc64__
46 bool dofloattest(double p1
, double p2
, double p3
, double p4
, double p5
, double p6
, double p7
,
47 double p8
, double p9
, double p10
, double p11
, double p12
, double p13
)
80 static bool comparevFloat(vFloat p1
, vFloat p2
)
82 return (memcmp(&p1
, &p2
, 16) == 0);
85 bool dovectortest(vFloat p1
, vFloat p2
, vFloat p3
, vFloat p4
, vFloat p5
)
87 vFloat r1
= { 1.1, 1.2, 1.3, 1.4 };
88 vFloat r2
= { 2.1, 2.2, 2.3, 2.4 };
89 vFloat r3
= { 3.1, 3.2, 3.3, 3.4 };
90 vFloat r4
= { 4.1, 4.2, 4.3, 4.4 };
91 vFloat r5
= { 5.1, 5.2, 5.3, 5.4 };
93 if ( !comparevFloat(p1
, r1
) )
95 if ( !comparevFloat(p2
, r2
) )
97 if ( !comparevFloat(p3
, r3
) )
99 if ( !comparevFloat(p4
, r4
) )
101 if ( !comparevFloat(p5
, r5
) )