Skip to content

Commit 1f651d8

Browse files
committed
Different bitcast
1 parent fcba828 commit 1f651d8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,26 @@ void Registers_REGDISPLAY::setRegister(int num, uint32_t value, uint32_t locatio
518518

519519
double Registers_REGDISPLAY::getFloatRegister(int num) const
520520
{
521+
union {
522+
uint64_t w;
523+
double d;
524+
} d;
525+
521526
assert(validFloatRegister(num));
522-
return D[num - UNW_ARM_D8];
527+
d.w = D[num - UNW_ARM_D8];
528+
return d.d;
523529
}
524530

525531
void Registers_REGDISPLAY::setFloatRegister(int num, double value)
526532
{
533+
union {
534+
uint64_t w;
535+
double d;
536+
} d;
537+
527538
assert(validFloatRegister(num));
528-
D[num - UNW_ARM_D8] = value;
539+
d.d = value;
540+
D[num - UNW_ARM_D8] = d.w;
529541
}
530542

531543
#endif // TARGET_ARM

0 commit comments

Comments
 (0)