ack/mach/mips/libem/c_ui_d.s

27 lines
411 B
ArmAsm
Raw Normal View History

#
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define .c_ui_d
.c_ui_d:
/* Input: r2
* Output: f0
* Only at and f30/f31 may be used.
*/
mtc1 r2, f0
cvt.d.w f0, f0
bgez r2, nonnegative
nop
ori at, zero, hi16[.fd_100000000]
ldc1 f30, lo16[.fd_100000000] (at)
add.d f0, f0, f30
nonnegative:
jr ra
nop
/* 4294967296 as a double. */
.sect .rom
.fd_100000000:
.data4 0, 0x41f00000