Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 24457 - X87 FPU Special Purpose Registers
Summary: - For 'register read --all' command on x86_64-Linux Platform: -- Provide correct values of X87 FPU Special Purpose Registers -- Both 32-bit & 64-bit inferiors give correct values on this Platform - Added a Test Vector: -- To verify the expected behaviour of the command Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ashok.thirumurthi, granata.enrico, tfiala, clayborg Differential Revision: http://reviews.llvm.org/D12592 llvm-svn: 246955
- Loading branch information
Abhishek Aggarwal
committed
Sep 7, 2015
1 parent
907abf7
commit 7f658ed
Showing
6 changed files
with
140 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
LEVEL = ../../make | ||
|
||
CXX_SOURCES := main.cpp | ||
CXX_SOURCES := main.cpp a.cpp | ||
|
||
include $(LEVEL)/Makefile.rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//===-- a.cpp ------------------------------------------------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#include <stdio.h> | ||
|
||
long double | ||
return_long_double (long double value) | ||
{ | ||
float a=2, b=4,c=8, d=16, e=32, f=64, k=128, l=256, add=0; | ||
__asm__ ( "fld %1 ;" | ||
"fld %2 ;" | ||
"fld %3 ;" | ||
"fld %4 ;" | ||
"fld %5 ;" | ||
"fld %6 ;" | ||
"fld %7 ;" | ||
"fadd ;" : "=g" (add) : "g" (a), "g" (b), "g" (c), "g" (d), "g" (e), "g" (f), "g" (k), "g" (l) ); // Set break point at this line. | ||
return value; | ||
} | ||
|
||
long double | ||
outer_return_long_double (long double value) | ||
{ | ||
long double val = return_long_double(value); | ||
val *= 2 ; | ||
return val; | ||
} | ||
|
||
long double | ||
outermost_return_long_double (long double value) | ||
{ | ||
long double val = outer_return_long_double(value); | ||
val *= 2 ; | ||
return val; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters