diff options
| author | Michal Gorny <mgorny@gentoo.org> | 2019-06-19 15:35:01 +0000 |
|---|---|---|
| committer | Michal Gorny <mgorny@gentoo.org> | 2019-06-19 15:35:01 +0000 |
| commit | a644b04b8cd80e5a7aa4185610fe01570b9827de (patch) | |
| tree | cec9860f118514caf5273b07f0232c6d5a382f93 /lldb/source/Plugins/Process/NetBSD | |
| parent | 64b60df99f8ad0c00a1d4711e56ce32495765416 (diff) | |
| download | bcm5719-llvm-a644b04b8cd80e5a7aa4185610fe01570b9827de.tar.gz bcm5719-llvm-a644b04b8cd80e5a7aa4185610fe01570b9827de.zip | |
[lldb] [Process/NetBSD] Remove unnecessary FPU presence checks for x86_64
Remove the checks for FPU presence, FXSAVE support and usage from
the code for x86_64. Those are always true for this architecture,
and in fact are hardcoded to true inside NetBSD kernel.
Differential Revision: https://reviews.llvm.org/D63554
llvm-svn: 363823
Diffstat (limited to 'lldb/source/Plugins/Process/NetBSD')
| -rw-r--r-- | lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp | 54 |
1 files changed, 1 insertions, 53 deletions
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp index c026f035d16..9849107f0bf 100644 --- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp +++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp @@ -90,58 +90,6 @@ static const RegisterSet g_reg_sets_x86_64[k_num_register_sets] = { }; #define REG_CONTEXT_SIZE (GetRegisterInfoInterface().GetGPRSize()) - -const int fpu_present = []() -> int { - int mib[2]; - int error; - size_t len; - int val; - - len = sizeof(val); - mib[0] = CTL_MACHDEP; - mib[1] = CPU_FPU_PRESENT; - - error = sysctl(mib, __arraycount(mib), &val, &len, NULL, 0); - if (error) - errx(EXIT_FAILURE, "sysctl"); - - return val; -}(); - -const int osfxsr = []() -> int { - int mib[2]; - int error; - size_t len; - int val; - - len = sizeof(val); - mib[0] = CTL_MACHDEP; - mib[1] = CPU_OSFXSR; - - error = sysctl(mib, __arraycount(mib), &val, &len, NULL, 0); - if (error) - errx(EXIT_FAILURE, "sysctl"); - - return val; -}(); - -const int fpu_save = []() -> int { - int mib[2]; - int error; - size_t len; - int val; - - len = sizeof(val); - mib[0] = CTL_MACHDEP; - mib[1] = CPU_FPU_SAVE; - - error = sysctl(mib, __arraycount(mib), &val, &len, NULL, 0); - if (error) - errx(EXIT_FAILURE, "sysctl"); - - return val; -}(); - } // namespace NativeRegisterContextNetBSD * @@ -197,7 +145,7 @@ int NativeRegisterContextNetBSD_x86_64::GetSetForNativeRegNum( if (reg_num <= k_last_gpr_x86_64) return GPRegSet; else if (reg_num <= k_last_fpr_x86_64) - return (fpu_present == 1 && osfxsr == 1 && fpu_save >= 1) ? FPRegSet : -1; + return FPRegSet; else if (reg_num <= k_last_avx_x86_64) return -1; // AVX else if (reg_num <= k_last_mpxr_x86_64) |

