modf_ppc64x.s raw

   1  // Copyright 2017 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  //go:build ppc64 || ppc64le
   6  
   7  #include "textflag.h"
   8  
   9  // func archModf(f float64) (int float64, frac float64)
  10  TEXT ·archModf(SB),NOSPLIT,$0
  11  	FMOVD	f+0(FP), F0
  12  	FRIZ	F0, F1
  13  	FMOVD	F1, int+8(FP)
  14  	FSUB	F1, F0, F2
  15  	FCPSGN	F2, F0, F2
  16  	FMOVD	F2, frac+16(FP)
  17  	RET
  18