chiark / gitweb /
Make run_directory.c stat the place it is going to try to run.
[elogind.git] / klibc / klibc / arch / cris / __negdi2.S
1 /*
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