+_aullshr()
authorshort <>
Mon, 24 Mar 2003 00:11:37 +0000 (00:11 +0000)
committershort <>
Mon, 24 Mar 2003 00:11:37 +0000 (00:11 +0000)
src/libcaptive/ps/math.c

index 6bd8612..f7734b6 100644 (file)
@@ -100,6 +100,28 @@ guint64 __attribute__((__stdcall__)) __attribute__((__regparm__(3))) _allshr(
 
 
 /**
+ * _aullshr:
+ * @long_00to31: Lower part of 64-bit unsigned number to shift.
+ * @long_32to63: Upper part of 64-bit unsigned number to shift.
+ * @count: Number of bits to shift by.
+ *
+ * 64-bit shift right by @count bits.
+ *
+ * This is a special function which is declared as %data in *.def
+ * file ke/exports.def as it has three arguments passed in registers.
+ *
+ * Returns: (@long_32to63 @long_00to31) unsigned-shifted right by @count bits.
+ */
+guint64 __attribute__((__stdcall__)) __attribute__((__regparm__(3))) _aullshr(
+               guint32 long_00to31,    /* %eax */
+               guint32 long_32to63,    /* %edx */
+               guint32 count)  /* %ecx */
+{
+       return (((((guint64)long_32to63)<<32U)|long_00to31)>>count);
+}
+
+
+/**
  * _allrem:
  * @divident: 64-bit signed divident.
  * @divisor: 64-bit signed divisor.