Charles L. Dorian | c3fa32c | 2010-02-18 23:33:15 -0800 | [diff] [blame] | 1 | // Copyright 2010 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 | |
Rob Pike | 8bca148 | 2014-08-12 17:04:45 -0700 | [diff] [blame] | 5 | #include "textflag.h" |
Keith Randall | 1f79663 | 2013-08-12 10:25:18 -0700 | [diff] [blame] | 6 | |
Russ Cox | 8572950 | 2012-09-21 00:35:56 -0400 | [diff] [blame] | 7 | // func Ldexp(frac float64, exp int) float64 |
Keith Randall | 1f79663 | 2013-08-12 10:25:18 -0700 | [diff] [blame] | 8 | TEXT ·Ldexp(SB),NOSPLIT,$0 |
Russ Cox | 8572950 | 2012-09-21 00:35:56 -0400 | [diff] [blame] | 9 | FMOVL exp+8(FP), F0 // F0=exp |
| 10 | FMOVD frac+0(FP), F0 // F0=frac, F1=e |
Charles L. Dorian | c3fa32c | 2010-02-18 23:33:15 -0800 | [diff] [blame] | 11 | FSCALE // F0=x*2**e, F1=e |
| 12 | FMOVDP F0, F1 // F0=x*2**e |
Russ Cox | 07720b6 | 2013-03-22 12:57:55 -0400 | [diff] [blame] | 13 | FMOVDP F0, ret+12(FP) |
Charles L. Dorian | c3fa32c | 2010-02-18 23:33:15 -0800 | [diff] [blame] | 14 | RET |