]>
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
)
81 #if __i386__ || __x86_64__ || __ppc__ || __ppc64__
83 static bool comparevFloat(vFloat p1
, vFloat p2
)
85 return (memcmp(&p1
, &p2
, 16) == 0);
88 bool dovectortest(vFloat p1
, vFloat p2
, vFloat p3
, vFloat p4
, vFloat p5
)
90 vFloat r1
= { 1.1, 1.2, 1.3, 1.4 };
91 vFloat r2
= { 2.1, 2.2, 2.3, 2.4 };
92 vFloat r3
= { 3.1, 3.2, 3.3, 3.4 };
93 vFloat r4
= { 4.1, 4.2, 4.3, 4.4 };
94 vFloat r5
= { 5.1, 5.2, 5.3, 5.4 };
96 if ( !comparevFloat(p1
, r1
) )
98 if ( !comparevFloat(p2
, r2
) )
100 if ( !comparevFloat(p3
, r3
) )
102 if ( !comparevFloat(p4
, r4
) )
104 if ( !comparevFloat(p5
, r5
) )