OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [i960/] [lib/] [__adddi3.S] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1623 jcastillo
/*
2
 * Copyright (C) 1999           Keith Adams 
3
 *                              Oregon Graduate Institute
4
 */
5
 
6
#include 
7
 
8
/*
9
 * 64-bit math routines that gcc needs but doesn't have.
10
 */
11
 
12
/*
13
 * 64-bit addition.
14
 *
15
 * registers:
16
 * g0 = low word of arg 1, g1 = hi word of arg 1
17
 * g2 = low word of arg 2, g3 = hi word of arg 2
18
 * it wants result in g0-g1
19
 */
20
#define AC_OVERFLOW_BIT 8
21
        .globl  SYMBOL_NAME(__adddi3)
22
SYMBOL_NAME_LABEL(__adddi3)
23
        cmpo    1, 0
24
        addc    g0, g2, g0
25
        addc    g1, g3, g1
26
        ret
27
 
28
/*
29
 * 64-bit subtraction: a-b = c
30
 *
31
 * registers in:
32
 * g0-g1 = a; g2-g3 = b
33
 * registers out:
34
 * g0-g1 = c
35
 */
36
        .globl  SYMBOL_NAME(__subdi3)
37
SYMBOL_NAME_LABEL(__subdi3)
38
        cmpo    1, 0
39
        subc    g2, g0, g0
40
        subc    g3, g1, g1
41
        ret

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.