|
|
1.1 root 1: .data
2: .text
3: LL0:.align 1
4: .globl Xcmpd
5: .set L12,0x1e00
6: .data
7: .text
8: _cmpd:
9: Xcmpd:.word L12
10: movl 4(fp),r12
11: movl 8(fp),r10
12: movl 12(fp),r11
13: movl 16(fp),r9
14: tstl r12
15: jgeq L16
16: xorl2 $-2147483648,r12
17: tstl r10
18: jeql L17
19: mnegl r10,r10
20: mcoml r12,r12
21: jbr L16
22: L17:mnegl r12,r12
23: L16:tstl r11
24: jgeq L19
25: xorl2 $-2147483648,r11
26: tstl r9
27: jeql L20
28: mnegl r9,r9
29: mcoml r11,r11
30: jbr L19
31: L20:mnegl r11,r11
32: L19:cmpl r12,r11
33: jeql L22
34: cmpl r12,r11
35: jleq L9999
36: movl $1,r0
37: jbr L9998
38: L9999:mnegl $1,r0
39: L9998:ret
40: L22:cmpl r10,r9
41: jeql L23
42: cmpl r10,r9
43: jlequ L9997
44: movl $1,r0
45: jbr L9996
46: L9997:mnegl $1,r0
47: L9996:ret
48: L23:clrl r0
49: ret
50:
51: #
52: # The assembler version is the output of cct for this whith minor editing
53: # (_cmpd --> cmpd).
54: #
55:
56: #cmpd(hi1, lo1, hi2, lo2)
57: # register hi1, hi2;
58: # register unsigned lo1, lo2;
59: #{
60: # if(hi1 < 0) {
61: # hi1 ^= 0x80000000;
62: # if(lo1) {
63: # lo1 = -lo1;
64: # hi1 = ~hi1;
65: # } else
66: # hi1 = -hi1;
67: # }
68: # if(hi2 < 0) {
69: # hi2 ^= 0x80000000;
70: # if(lo2) {
71: # lo2 = -lo2;
72: # hi2 = ~hi2;
73: # } else
74: # hi2 = -hi2;
75: # }
76: # if(hi1 != hi2)
77: # return(hi1>hi2 ? 1 : -1);
78: # if(lo1 != lo2)
79: # return(lo1>lo2 ? 1 : -1);
80: # return(0);
81: #}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.