386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Tue, 22 Jan 1991 06:51:28 +0000 (22:51 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Tue, 22 Jan 1991 06:51:28 +0000 (22:51 -0800)
Work on file usr/src/usr.bin/gcc/gnulib/longlong/cmpdi2.c

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

usr/src/usr.bin/gcc/gnulib/longlong/cmpdi2.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/gcc/gnulib/longlong/cmpdi2.c b/usr/src/usr.bin/gcc/gnulib/longlong/cmpdi2.c
new file mode 100644 (file)
index 0000000..ac1a4f2
--- /dev/null
@@ -0,0 +1,20 @@
+#include "longlong.h"
+
+SItype
+__cmpdi2 (a, b)
+     long long a, b;
+{
+  long_long au, bu;
+
+  au.ll = a, bu.ll = b;
+
+  if (au.s.high < bu.s.high)
+    return 0;
+  else if (au.s.high > bu.s.high)
+    return 2;
+  if ((unsigned) au.s.low < (unsigned) bu.s.low)
+    return 0;
+  else if ((unsigned) au.s.low > (unsigned) bu.s.low)
+    return 2;
+  return 1;
+}