...
Text file
src/math/modf_arm64.s
Documentation: math
1// Copyright 2016 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.
4
5#include "textflag.h"
6
7// func archModf(f float64) (int float64, frac float64)
8TEXT ·archModf(SB),NOSPLIT,$0
9 MOVD f+0(FP), R0
10 FMOVD R0, F0
11 FRINTZD F0, F1
12 FMOVD F1, int+8(FP)
13 FSUBD F1, F0
14 FMOVD F0, R1
15 AND $(1<<63), R0
16 ORR R0, R1 // must have same sign
17 MOVD R1, frac+16(FP)
18 RET
View as plain text