Text file src/math/sqrt_arm.s

     1  // Copyright 2011 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 archSqrt(x float64) float64
     8  TEXT ·archSqrt(SB),NOSPLIT,$0
     9  	MOVB	runtime·goarm(SB), R11
    10  	CMP	$5, R11
    11  	BEQ	arm5
    12  	MOVD	x+0(FP),F0
    13  	SQRTD	F0,F0
    14  	MOVD	F0,ret+8(FP)
    15  	RET
    16  arm5:
    17  	// Tail call to Go implementation.
    18  	// Can't use JMP, as in softfloat mode SQRTD is rewritten
    19  	// to a CALL, which makes this function have a frame.
    20  	RET	·sqrt(SB)
    21  

View as plain text