196 Commits

Author SHA1 Message Date
Theodore Dubois
9ae0371250 Implement fsin and fcos 2020-01-05 22:30:42 -08:00
Theodore Dubois
5f308a7105 Implement non-globally-atomic cmpxchg8b 2020-01-05 22:30:42 -08:00
Theodore Dubois
ac7898bcc5 Implement finctsp 2020-01-01 19:41:58 -08:00
Theodore Dubois
dd8d3fb9d1 Fix race condition in mem_segv_reason
There's a brief delay between the page fault and calling
mem_segv_reason, and in that window the access could become valid.
2020-01-01 19:36:28 -08:00
Theodore Dubois
bb7c39a66d Free JIT jetsam (jitsam?) when the process exits 2019-12-31 22:05:58 -08:00
Theodore Dubois
3e33c605f6 Implement fsave/frstor 2019-12-22 14:00:44 -08:00
Theodore Dubois
f1b738ad10 Implement cmpxchg8b 2019-12-09 20:33:44 -08:00
Theodore Dubois
f2833e4762 Fix atomic non-32-bit cmpxchg on aarch64 2019-12-09 19:22:19 -08:00
Theodore Dubois
996a4b6cbf Add locking around mapping changes in mem_ptr
Fixed #104
2019-11-26 13:05:28 -08:00
Theodore Dubois
c72c9029f1 Fix lock ordering between jit->lock and mem->lock
#461
2019-11-25 15:51:30 -08:00
Theodore Dubois
dca7617502 Implement fnstenv/fldenv 2019-11-18 09:11:21 -08:00
Theodore Dubois
08e9a98c4c Delay the freeing of jit blocks
Fixed #536
2019-11-17 11:42:51 -08:00
Theodore Dubois
32ae8bc6a5 Fix warnings in Matt's code 2019-10-26 16:26:52 -07:00
Matthew Merrill
4a2b63bc3e s/_vi/_v_imm/ 2019-10-20 17:31:43 -07:00
Matthew Merrill
98d7f2c21f fix renaming of vi to v_imm 2019-10-20 16:43:39 -07:00
Matthew Merrill
f2dd13831a Remove case parens, rename jit/gen macros 2019-10-20 16:28:46 -07:00
Matthew Merrill
6b0a00ef9d It's probably a good idea if I actually commit these things 2019-10-20 13:40:46 -07:00
Matthew Merrill
a5ef557b7e Implement sse2: psrlq, movdqa 2019-10-20 13:31:51 -07:00
Matthew Merrill
251965c0e3 more sse stuff 2019-10-20 13:31:50 -07:00
Matthew Merrill
1c7b53dfbb simplify vec gadget branching 2019-10-20 13:31:50 -07:00
Matthew Merrill
3c2c8230eb Simplify needless branching in jit/gen 2019-10-19 22:40:02 -07:00
Matthew Merrill
432b490ec8 idk what this is 2019-10-19 22:23:33 -07:00
Matthew Merrill
d8b08da8c0 movaps, movss, movsd, ucomiss, pxor, xorps 2019-10-19 22:23:33 -07:00
Theodore Dubois
c0f2ebcfbc Fix order of arguments to non-memory SSE operations 2019-10-19 22:22:39 -07:00
Matthew Merrill
e8215beacd Migrate -Djit=true option to -Dengine=jit.
This has the side effect of making it impossible to
compile in what was `-Djit=false`.
2019-10-19 21:06:06 -07:00
Theodore Dubois
e264b10828 Do 16-bit signed shifts correctly on arm
Fixes #511
2019-10-13 20:27:52 -07:00
Theodore Dubois
3d11d053e2 Implement ficomp for latest gcc
Fixes #506
2019-10-06 14:27:44 -07:00
Theodore Dubois
537a48e8bb Fix reported segfault IP for vector instructions 2019-10-05 22:24:04 -07:00
Xiangyan Sun
9c3c950a87 Add comments. 2019-09-09 14:24:28 +08:00
Xiangyan Sun
13a381e9cc Aesthestic changes. 2019-09-09 13:56:09 +08:00
Xiangyan Sun
46cb475625 Port to x86_64. 2019-09-09 13:37:42 +08:00
Xiangyan Sun
cece30843e Rearrange call/ret gadgets for aarch64. 2019-09-09 13:29:15 +08:00
Xiangyan Sun
75dfe4d30b Fix generating wrong block address when block is reallocated. 2019-09-06 01:51:50 +08:00
Xiangyan Sun
e1659aa6bb Flush return cache when we flush tlb. 2019-09-06 01:51:02 +08:00
Xiangyan Sun
5090d4c268 Add x86-64 port for return cache. 2019-09-05 02:57:41 +08:00
Xiangyan Sun
07cb7c9d83 Further optimize aarch64 asm. 2019-09-05 01:46:13 +08:00
Xiangyan Sun
907be9fe11 Optimize ret cache memory size. 2019-09-04 13:38:54 +08:00
Xiangyan Sun
f418a61493 Initial return cache impl for aarch64. 2019-09-01 02:16:51 +08:00
Theodore Dubois
2e0e9d7001 Fix stupid bug in xmm codegen 2019-07-14 19:24:44 -07:00
Theodore Dubois
9b68d02add Make this segfault report thing compile ONCE and FOR ALL 2019-07-05 19:40:10 -07:00
Theodore Dubois
e1ab507b83 Fix aarch64 segfault type reporting again please work please work 2019-07-05 18:09:36 -07:00
Theodore Dubois
58a1f4182a Fix aarch64 segfault type reporting 2019-07-05 17:57:28 -07:00
Theodore Dubois
c6e818b5c5 Include the reason for a segfault 2019-07-05 17:44:29 -07:00
Theodore Dubois
ae69bd53f7 Attempt to handle locked 16-bit cmpxchg 2019-06-02 16:21:54 -07:00
Theodore Dubois
22f061546c Implement all sizes of cmpxchg on aarch64 2019-05-27 14:46:43 -07:00
Theodore Dubois
267fd16bb6 Implement all sizes of cmpxchg on x86_64 2019-05-26 19:24:21 -07:00
Theodore Dubois
5be148283f Don't treat some undefined instructions like crashes 2019-05-26 19:24:21 -07:00
Theodore Dubois
09c7efe9ab Hopefully unbreak build 2019-05-26 11:46:59 -07:00
Theodore Dubois
a3ba4cefcc Actually implement movsd for x86 2019-05-26 11:40:18 -07:00
Theodore Dubois
7f34c1ffa9 Theoretically implement movsd 2019-05-25 23:33:48 -07:00