summaryrefslogtreecommitdiff
path: root/src/core/ao_int64.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-22 17:08:55 -0700
committerKeith Packard <keithp@keithp.com>2013-08-25 22:24:01 -0700
commit5ccd902d0fd2adc40c72982babb60fac4da6a087 (patch)
tree1316443d33623b6cf7c82c3688bd3cfcdb0412c8 /src/core/ao_int64.h
parentf7602ae566a5cbf2d2cbb1d68bad7e2d1177a33a (diff)
altos: Add 64x64 multiply. Test 64 ops for dest same as either source
The test change is to ensure that the destination may be one of the 64 bit sources. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_int64.h')
-rw-r--r--src/core/ao_int64.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/ao_int64.h b/src/core/ao_int64.h
index 93aa87e4..e5eee823 100644
--- a/src/core/ao_int64.h
+++ b/src/core/ao_int64.h
@@ -26,14 +26,19 @@ typedef struct {
} ao_int64_t;
void ao_plus64(ao_int64_t *r, ao_int64_t *a, ao_int64_t *b);
+void ao_neg64(ao_int64_t *r, ao_int64_t *a);
+void ao_lshift64_16(ao_int64_t *r, uint16_t a, uint8_t d);
void ao_rshift64(ao_int64_t *r, ao_int64_t *a, uint8_t d);
void ao_lshift64(ao_int64_t *r, ao_int64_t *a, uint8_t d);
-void ao_mul64(ao_int64_t *r, int32_t a, int32_t b);
-void ao_mul64_16(ao_int64_t *r, ao_int64_t *a, uint16_t b);
+void ao_mul64_64_64(ao_int64_t *r, ao_int64_t *a, ao_int64_t *b);
+void ao_mul64_32_32(ao_int64_t *r, int32_t a, int32_t b);
+void ao_mul64_64_16(ao_int64_t *r, ao_int64_t *a, uint16_t b);
#define ao_int64_init32(r, a) (((r)->high = 0), (r)->low = (a))
#define ao_int64_init64(r, a, b) (((r)->high = (a)), (r)->low = (b))
#define ao_cast64(a) (((int64_t) (a)->high << 32) | (a)->low)
+#define ao_int64_negativep(a) (((int32_t) (a)->high) < 0)
+
#endif /* _AO_INT64_H_ */