Magellan Linux

Annotation of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/cris/__negdi2.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (hide annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 393 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 niro 532 /*
2     * arch/cris/__negdi2.c
3     */
4    
5     /*
6     * In 2's complement arithmetric, -x == (~x + 1), so
7     * -{h,l} = (~{h,l} + {0,1)
8     * -{h,l} = {~h,~l} + {0,1}
9     * -{h,l} = {~h + cy, ~l + 1}
10     * ... where cy = (l == 0)
11     * -{h,l} = {~h + cy, -l}
12     */
13    
14     .text
15     .balign 4
16     .type __negdi2,@function
17     .globl __negdi2
18     __negdi2:
19     neg.d $r10,$r10
20     seq $r12
21     not $r11
22     ret
23     add.d $r12,$r11
24    
25     .size __negdi2, .-__negdi2