github.com/twelsh-aw/go/src@v0.0.0-20230516233729-a56fe86a7c81/math/modf_arm64.s (about)

     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)
     8  TEXT ·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