Commit graph

14940 commits

Author SHA1 Message Date
Jonathan Russell
2dd2344e80 - implemented SS_R, LCS_R, and LKS_R 2019-04-15 14:33:02 +02:00
Magnus Norddahl
fb7df75011 - fix bug in LKF_R 2019-04-15 14:33:00 +02:00
Magnus Norddahl
d74cc3e49e - fixed OP_VTBL bug 2019-04-15 14:32:59 +02:00
Magnus Norddahl
e93d9570dc - fix crash in OP_RET handling 2019-04-15 14:32:57 +02:00
Magnus Norddahl
378e58731a - simplify some code 2019-04-15 14:32:56 +02:00
Jonathan Russell
b342dbc8db - added string PARAM and RET 2019-04-15 14:32:54 +02:00
Magnus Norddahl
608f49a4a8 - fix clang errors and warnings 2019-04-15 14:32:53 +02:00
Jonathan Russell
06780bf228 - added OP_MOVES, OP_CONCAT, OP_LENS, OP_CMPS 2019-04-15 14:32:52 +02:00
Magnus Norddahl
a4b3536caf - fix opcodes not being listed in jit debug assembly 2019-04-15 14:32:50 +02:00
Magnus Norddahl
c328f9c85c - move EmitRESULT to jit_call 2019-04-15 14:32:49 +02:00
Magnus Norddahl
ff8d21b2ec - minor cleanups in header file 2019-04-15 14:32:47 +02:00
Magnus Norddahl
9d970a1acb - split JitCompiler into multiple files 2019-04-15 14:32:46 +02:00
Jonathan Russell
8905701df7 - added strings and a few string opcodes 2019-04-15 14:32:44 +02:00
Magnus Norddahl
f3ca96373a - fix CALL_K and disable CALL 2019-04-15 14:32:43 +02:00
Magnus Norddahl
56fe7af9d3 - implement OP_CALL and OP_CALL_K 2019-04-15 14:32:41 +02:00
Magnus Norddahl
60ee2c91a4 - fix misc integer opcodes and remove mov statements when they have no effect 2019-04-15 14:32:40 +02:00
Jonathan Russell
279e97fcc9 - changed the way EmitComparisonOpcode works to get rid of the temporary register that was used previously 2019-04-15 14:32:38 +02:00
Magnus Norddahl
c248fad17f - implement PARAM and PARAMI 2019-04-15 14:32:37 +02:00
Magnus Norddahl
53b11dd0d8 - fix missing zero extend 2019-04-15 14:32:36 +02:00
Magnus Norddahl
29f6258d33 - fix that the code for META and CLSS was swapped 2019-04-15 14:32:34 +02:00
Magnus Norddahl
c2669d3a03 - some jump fixes 2019-04-15 14:32:33 +02:00
Magnus Norddahl
f7dd6a1313 - fix jump direction in EmitComparisonOpcode 2019-04-15 14:32:31 +02:00
Jonathan Russell
9530a2e43c - more spelling mistakes... 2019-04-15 14:32:29 +02:00
Jonathan Russell
a770b3af16 - fix minor spelling error 2019-04-15 14:32:28 +02:00
Jonathan Russell
821c336c5e - add vector comparison opcodes 2019-04-15 14:32:26 +02:00
Magnus Norddahl
14d6aa8cac - remove some macros and add functions checking if a register needs to be copied 2019-04-15 14:32:25 +02:00
Magnus Norddahl
35a8162022 - implemented LBIT, SBIT, VTBL, SCOPE, NEW, NEW_K, THROW, EQA_R and EQA_K 2019-04-15 14:32:23 +02:00
Magnus Norddahl
4cab630871 - implement emitter functions for LKP_R, META, CLSS, LO, LO_R, LP, LP_R, SO, SO_R, SP, SP_R
- add emit code for throwing exceptions on null pointers
2019-04-15 14:32:22 +02:00
Magnus Norddahl
2efaa7846d - improve jit debug output slightly 2019-04-15 14:32:20 +02:00
Magnus Norddahl
f0dbc8414a - fix offsetting bug when loading address registers 2019-04-15 14:32:19 +02:00
Magnus Norddahl
db78d02d79 - fix swapped operands in EmitSUBF_KR 2019-04-15 14:32:17 +02:00
Magnus Norddahl
ede8c6d86b - implement MODF_RR, MODF_RK and MODF_KR 2019-04-15 14:32:16 +02:00
Magnus Norddahl
708362b31f - fix mul using wrong instruction 2019-04-15 14:32:14 +02:00
Magnus Norddahl
c46a4d4483 - implement BOUND opcodes and add logging the resulting assembly code if asmjit throws an exception 2019-04-15 14:32:13 +02:00
Magnus Norddahl
c2938926a7 - implement a few more opcodes and fix some bugs 2019-04-15 14:32:11 +02:00
Magnus Norddahl
9427e22d7c - implemented pow, min, max 2019-04-15 14:32:10 +02:00
Magnus Norddahl
f4181be6b8 - implement ATAN2 and FLOP 2019-04-15 14:32:08 +02:00
Magnus Norddahl
77fe376eca - implement DYNCAST*, TEST, TESTN and JMP opcodes 2019-04-15 14:32:07 +02:00
Magnus Norddahl
9474a2554d - convert JitCompile's switch into a class to enable easier code reuse 2019-04-15 14:32:05 +02:00
Magnus Norddahl
9889d2fbb6 - fix clang compile error 2019-04-15 14:32:03 +02:00
Magnus Norddahl
976a7fab3a - implement throwing by storing exception information in a struct, then return from the jitted function and throw from c++ 2019-04-15 14:32:02 +02:00
Jonathan Russell
45bc0d266e - removed the ability to use printf-like formatting in emitAbortExceptionCall, it barely worked 2019-04-15 14:32:00 +02:00
Jonathan Russell
197b20af5d - add first draft of abort exceptions 2019-04-15 14:31:58 +02:00
Magnus Norddahl
c65b7076eb - call play sqrt when calculating lengths 2019-04-15 14:31:57 +02:00
Magnus Norddahl
50d0049460 - fix 8 and 16 bit store 2019-04-15 14:31:55 +02:00
Magnus Norddahl
76c08bf725 - destroy the jit runtime when all script functions are destroyed 2019-04-15 14:31:54 +02:00
Magnus Norddahl
4820c32794 - disable all unimplemented opcodes in the switch to ensure 'Unknown VM opcode' fatal error is generated if CanJit has a bug 2019-04-15 14:31:52 +02:00
Magnus Norddahl
e9914f38af Fix compile errors on macOS 2019-04-15 14:31:51 +02:00
Jonathan Russell
601c492cf2 - added remaining int arithmetic opcodes (and fixed float loading offset issue) 2019-04-15 14:31:49 +02:00
Jonathan Russell
e771064657 - forgot to turn off debug switch in last commit 2019-04-15 14:31:47 +02:00