1*21425Sdist/* 2*21425Sdist * Copyright (c) 1980 Regents of the University of California. 3*21425Sdist * All rights reserved. The Berkeley software License Agreement 4*21425Sdist * specifies the terms and conditions for redistribution. 5*21425Sdist */ 617000Sralph 7*21425Sdist#ifndef lint 8*21425Sdiststatic char sccsid[] = "@(#)frexp.s 5.1 (Berkeley) 05/30/85"; 9*21425Sdist#endif not lint 10*21425Sdist 1117000Sralph/* C library -- frexp(value, eptr) */ 1217000Sralph 1317000Sralph#include "DEFS.h" 1417000Sralph 1517329SsamENTRY(frexp, 0) 1617000Sralph movd 4(ap),r0 # (r0,r1) := value 1717000Sralph extzv $7,$8,r0,*12(ap) # Fetch exponent 1817000Sralph jeql 1f # If exponent zero, we're done 1917000Sralph subl2 $128,*12(ap) # Bias the exponent appropriately 2017000Sralph insv $128,$7,$8,r0 # Force result exponent to biased 0 2117000Sralph1: 2217000Sralph ret 23