Commit graph

28 commits

Author SHA1 Message Date
github-jane-doe 15ff296628
Typos (#371)
Fix typos
2020-10-04 19:46:41 +02:00
copy 289b8038b1 Cleanup 2019-05-18 14:16:37 -05:00
iamahuman 9c3f704d57 Use ES intrinsics for mul / imul, bsr / bsf
For integer multiplication, direct product of two 32-bit integers in
double precision FP arithmetic yields its higher 53 bits which are
sufficient for higher half of the product, while the lower half may be
computed with `Math.imul()`. A polyfill is provided for < IE 10.

For `floor(log2(n))` where `n` is a 32-bit integer, `31 - Math.clz32(n)`
is an accurate substitute for `v86util.int_log2` and preserves
`int_log2(0) = -1` (should it ever occur).
2019-05-18 14:16:16 -05:00
David Bullado a9c0cd9679 Refactoring of fpu.integer_round 2018-10-01 14:26:23 -03:00
David Bullado 75c825a76d Add a trailing line in arith.js 2018-10-01 14:26:23 -03:00
David Bullado 886d699ea9 Implement instruction cvtps2pi 2018-10-01 14:26:23 -03:00
copy a22bebe227 Implement some sse1 and sse2 instructions (#48)
No floating point, everything for Linux, FreeBSD and KolibriOS
2017-06-23 16:30:14 -05:00
copy 18f347d577 Implement Intel undefined behaviour 2017-06-23 16:19:27 -05:00
Amaan Cheval 717640da3c Add saturate_sd_to_ub and saturate_ud_to_ub util functions
for paddusb and psubusb
2017-06-16 10:47:19 -04:00
Amaan Cheval 3a42e973b6 Add helper saturate_sd_to_sb function for psubsb 2017-06-16 10:47:19 -04:00
Amaan Cheval 0d18d28ad6 Update saturate util functions to avoid multiple / early returns
(from if conditions)
2017-06-16 10:47:19 -04:00
Amaan Cheval f5aef9ec5e Implement saturate_sd_to_sw helper function for packssdw 2017-06-16 10:47:19 -04:00
Amaan Cheval 7958113b37 Implement saturate_sw_to_sb helper function for packsswb 2017-06-16 10:47:19 -04:00
Amaan Cheval 795c0acc9f Add utility function for saturation arithmetic
(Signed word to unsigned byte)
2017-06-16 10:47:19 -04:00
copy cba0826785 Fix DAS instruction (found with kvm-unit-test) 2017-03-21 17:28:24 -05:00
copy 5bff5899f8 Bit offset can be negative 2016-11-21 20:10:03 +01:00
copy 5e9e1ca90d Get rid of global state 2016-10-01 23:22:10 +02:00
copy 70ad2f9031 Move memory to cpu 2016-08-02 04:15:24 +02:00
copy 1e8a355572 Minor changes 2016-03-26 15:21:16 +01:00
copy 7665ee1353 Don't use CPU statically (closure compiler warning) 2016-02-14 23:49:29 +01:00
copy acdd03d758 Fix typo 2016-01-23 00:15:59 +01:00
copy 27c7481d30 Assert bit_offset >= 0 2016-01-22 23:49:49 +01:00
copy f60717b28d Fix aad 2016-01-22 23:49:25 +01:00
copy ee8ab6a2da Set flags in bsf, bsr, mul, imul 2016-01-22 23:48:05 +01:00
copy 47d73becdb Divide by zero check earlier 2016-01-22 23:46:00 +01:00
copy d26801457b Trailing whitespace 2015-09-16 03:25:09 +02:00
copy 451516c2fb Fix 32 bit division 2015-09-16 03:16:45 +02:00
copy 9185dd25e4 Remove C macros and compile step. Fixes #10 2015-09-14 01:45:51 +02:00
Renamed from src/arith.macro.js (Browse further)