| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: fp.S,v 1.50 2019/04/06 03:06:26 thorpej Exp $ */ | | 1 | /* $NetBSD: fp.S,v 1.51 2020/06/25 11:48:39 simonb Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1992, 1993 | | 4 | * Copyright (c) 1992, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to Berkeley by | | 7 | * This code is derived from software contributed to Berkeley by |
8 | * Ralph Campbell. | | 8 | * Ralph Campbell. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -1838,27 +1838,27 @@ cvt_d_s: | | | @@ -1838,27 +1838,27 @@ cvt_d_s: |
1838 | srl t2, t2, 3 | | 1838 | srl t2, t2, 3 |
1839 | b result_fs_d | | 1839 | b result_fs_d |
1840 | | | 1840 | |
1841 | /* | | 1841 | /* |
1842 | * Convert integer to double. | | 1842 | * Convert integer to double. |
1843 | */ | | 1843 | */ |
1844 | cvt_d_w: | | 1844 | cvt_d_w: |
1845 | jal _C_LABEL(get_fs_int) | | 1845 | jal _C_LABEL(get_fs_int) |
1846 | bne t2, zero, 1f # check for zero | | 1846 | bne t2, zero, 1f # check for zero |
1847 | move t1, zero # result=0 | | 1847 | move t1, zero # result=0 |
1848 | move t3, zero | | 1848 | move t3, zero |
1849 | b result_fs_d | | 1849 | b result_fs_d |
1850 | /* | | 1850 | /* |
1851 | * Find out how many leading zero bits are in t2 and put in at. | | 1851 | * Find out how many leading zero bits are in t2 and put in v1. |
1852 | */ | | 1852 | */ |
1853 | #if __mips == 32 || __mips == 64 | | 1853 | #if __mips == 32 || __mips == 64 |
1854 | clz v1, t2 | | 1854 | clz v1, t2 |
1855 | #else /* __mips == 32 || __mips == 64 */ | | 1855 | #else /* __mips == 32 || __mips == 64 */ |
1856 | .set noat | | 1856 | .set noat |
1857 | 1: | | 1857 | 1: |
1858 | move v0, t2 | | 1858 | move v0, t2 |
1859 | move v1, zero | | 1859 | move v1, zero |
1860 | srl AT, v0, 16 | | 1860 | srl AT, v0, 16 |
1861 | bne AT, zero, 1f | | 1861 | bne AT, zero, 1f |
1862 | addu v1, 16 | | 1862 | addu v1, 16 |
1863 | sll v0, 16 | | 1863 | sll v0, 16 |
1864 | 1: | | 1864 | 1: |