From 532783f9e1e65c7bd48b1592d2376e9dd47c5a73 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 1 Oct 2021 16:49:37 +0200 Subject: [PATCH] [libunwind] Fix cfi_register for float registers. Fixes D110144. registers.getFloatRegister is not const in ARM therefor can't be called here. Reviewed By: mstorsjo, #libunwind Differential Revision: https://reviews.llvm.org/D110731 --- libunwind/src/DwarfInstructions.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libunwind/src/DwarfInstructions.hpp b/libunwind/src/DwarfInstructions.hpp index 53baf6a148f3..b58c51bb7a60 100644 --- a/libunwind/src/DwarfInstructions.hpp +++ b/libunwind/src/DwarfInstructions.hpp @@ -115,10 +115,12 @@ double DwarfInstructions::getSavedFloatRegister( return addressSpace.getDouble( evaluateExpression((pint_t)savedReg.value, addressSpace, registers, cfa)); - case CFI_Parser::kRegisterInRegister: - return registers.getFloatRegister((int)savedReg.value); case CFI_Parser::kRegisterUndefined: return 0.0; + case CFI_Parser::kRegisterInRegister: +#ifndef _LIBUNWIND_TARGET_ARM + return registers.getFloatRegister((int)savedReg.value); +#endif case CFI_Parser::kRegisterIsExpression: case CFI_Parser::kRegisterUnused: case CFI_Parser::kRegisterOffsetFromCFA: