1 // Copyright 2022 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // riscv64 allows 32-bit floats to live in the bottom
8 // part of the register, it expects them to be NaN-boxed.
9 // These functions are needed to ensure correct conversions
12 // Convert float32->uint64
13 TEXT ·archFloat32ToReg(SB),NOSPLIT,$0-16
18 // Convert uint64->float32
19 TEXT ·archFloat32FromReg(SB),NOSPLIT,$0-12
20 // Normally a float64->float32 conversion
21 // would need rounding, but riscv64 store valid
22 // float32 in the lower 32 bits, thus we only need to
23 // unboxed the NaN-box by store a float32.