]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/functionalities/register/a.cpp
Vendor import of lldb release_39 branch r287912:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / functionalities / register / a.cpp
1 //===-- a.cpp ------------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 #include <stdio.h>
10
11 long double
12 return_long_double (long double value)
13 {
14 #if defined (__i386__) || defined (__x86_64__)
15     float a=2, b=4,c=8, d=16, e=32, f=64, k=128, l=256, add=0;
16     __asm__ (
17         "int3 ;"
18         "flds %1 ;"
19         "flds %2 ;"
20         "flds %3 ;"
21         "flds %4 ;"
22         "flds %5 ;"
23         "flds %6 ;"
24         "flds %7 ;"
25         "faddp ;" : "=g" (add) : "g" (a), "g" (b), "g" (c), "g" (d), "g" (e), "g" (f), "g" (k), "g" (l) );  // Set break point at this line.
26 #endif    // #if defined (__i386__) || defined (__x86_64__)
27     return value;
28 }
29
30 long double
31 outer_return_long_double (long double value)
32 {
33     long double val = return_long_double(value);
34     val *= 2 ;
35     return val;
36 }
37
38 long double
39 outermost_return_long_double (long double value)
40 {
41     long double val = outer_return_long_double(value);
42     val *= 2 ;
43     return val;
44 }