Skip to content

Commit a39d87b

Browse files
committed
[NativeAOT] Fix floating pointer register unwindind on Arm32
NativeAOT specific register window implementation has to match the one in libunwind.
1 parent 6d9cd59 commit a39d87b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ struct Registers_REGDISPLAY : REGDISPLAY
354354
uint32_t getRegister(int num) const;
355355
void setRegister(int num, uint32_t value, uint32_t location);
356356

357-
double getFloatRegister(int num) const;
358-
void setFloatRegister(int num, double value);
357+
unw_fpreg_t getFloatRegister(int num) const;
358+
void setFloatRegister(int num, unw_fpreg_t value);
359359

360360
libunwind::v128 getVectorRegister(int num) const { abort(); }
361361
void setVectorRegister(int num, libunwind::v128 value) { abort(); }
@@ -516,13 +516,13 @@ void Registers_REGDISPLAY::setRegister(int num, uint32_t value, uint32_t locatio
516516
}
517517
}
518518

519-
double Registers_REGDISPLAY::getFloatRegister(int num) const
519+
unw_fpreg_t Registers_REGDISPLAY::getFloatRegister(int num) const
520520
{
521521
assert(validFloatRegister(num));
522-
return unwindhelpers_bitcast<double>(D[num - UNW_ARM_D8]);
522+
return unwindhelpers_bitcast<unw_fpreg_t>(D[num - UNW_ARM_D8]);
523523
}
524524

525-
void Registers_REGDISPLAY::setFloatRegister(int num, double value)
525+
void Registers_REGDISPLAY::setFloatRegister(int num, unw_fpreg_t value)
526526
{
527527
assert(validFloatRegister(num));
528528
D[num - UNW_ARM_D8] = unwindhelpers_bitcast<uint64_t>(value);

0 commit comments

Comments
 (0)