4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1988 AT&T */
28 /* All Rights Reserved */
33 * Double long subtraction routine. Ported from pdp 11/70 version
34 * with considerable effort. All supplied comments were ported.
35 * Ported from m32 version to sparc. No comments about difficulty.
47 ld [%o7+
8],%o4
! Instruction at ret-addr should
be a
48 cmp %o4
,8 ! 'unimp 8' indicating
a valid call.
49 be 1f
! if OK
, go forward.
50 nop ! delay instruction.
52 nop ! delay instruction.
55 ld [%o0+
0],%o2
! fetch lop.dl_hop
56 ld [%o0+
4],%o3
! fetch lop.dl_lop
57 ld [%o1+
0],%o4
! fetch rop.dl_hop
58 ld [%o1+
4],%o5
! fetch rop.dl_lop
59 subcc
%o3
,%o5
,%o3
! lop.dl_lop
- rop.dl_lop
(set carry
)
60 subxcc
%o2
,%o4
,%o2
! lop.dl_hop
- rop.dl_hop
- <carry
>
61 ld [%sp+
(16*4)],%o0
! address to store result into
62 st %o2
,[%o0
] ! store result.dl_hop
64 st %o3
,[%o0+
4] ! store result.dl_lop