Commit graph

895 commits

Author SHA1 Message Date
Magnus Norddahl
00d41432d8 - disable jit in 32-bit builds 2018-11-15 22:47:44 +01:00
Magnus Norddahl
5ef2175c38 - fix wrong offsets 2018-11-15 22:40:12 +01:00
Magnus Norddahl
0394dc56b7 - generate a memset for the allocated stack memory because that's what the VM does
(this really shouldn't be done by the VM either - the compiler backend should clear its registers if it wants them to be zero!)
2018-11-15 22:33:13 +01:00
Magnus Norddahl
f3e0db913c - fix operand size mismatch error 2018-11-15 22:07:27 +01:00
Magnus Norddahl
3b2faf5397 Merge remote-tracking branch 'origin/master' into asmjit 2018-11-15 22:02:11 +01:00
Cacodemon345
07838f4c2a BOUNCEONUNRIPPABLES flag; makes actors bounce on actors with DONTRIP flag 2018-11-15 12:47:57 +01:00
alexey.lysiuk
39a3527396 - fixed compilation of targets with optimization 2018-11-15 10:59:37 +02:00
Christoph Oelckers
aa4de71e6d Merge branch 'master' into asmjit 2018-11-15 09:25:27 +01:00
Chronos Ouroboros
96b8f12a30 Fix the code for MODF_RK in the JIT compiler. 2018-11-14 21:05:24 -02:00
Chronos Ouroboros
566eb58000 Fixed the Vector2/3 != operator. 2018-11-14 20:01:13 +01:00
Chronos Ouroboros
5375a99cf6 Added support for CMP_APPROX to EQV_R and moved the code to a template. 2018-11-14 10:29:48 -02:00
Magnus Norddahl
8429fc8124 - fix missing type check when using Push or Insert for typed arrays 2018-11-14 10:08:04 +01:00
Magnus Norddahl
99849bc0c5 Merge remote-tracking branch 'origin/master' into asmjit 2018-11-14 01:23:17 +01:00
Christoph Oelckers
33f2f9f34e - fixed: ZScript's finalization code used the last parsed lump for of one translation unit as reference, not the base lump.
This resulted in incorrect messages but also could produce some more subtle errors.
2018-11-12 00:22:50 +01:00
Magnus Norddahl
e6023c55a8 - modify exception checks to jump ahead if the exception is to be thrown as it limits static misprediction 2018-11-10 22:48:20 +01:00
Magnus Norddahl
a7ef178284 - fix a typo 2018-11-10 19:56:54 +01:00
Magnus Norddahl
173fe94736 - fix the throw messages 2018-11-10 19:52:41 +01:00
Christoph Oelckers
3c5609537a - fixed vector math instructions to use the same order of operations as the VM. 2018-11-09 22:36:08 +01:00
Magnus Norddahl
534606f4ce - add vm_jit cvar to control JIT compilation 2018-11-01 21:39:30 +01:00
Magnus Norddahl
369dcfd57f Merge remote-tracking branch 'origin/master' into asmjit 2018-11-01 21:23:26 +01:00
alexey.lysiuk
8597c9e326 - added warning for constant conditional expression
ZScript code like `if (x = 0) // ...` no longer causes assertion failure in Debug but produces a warning regadless of configuration

https://forum.zdoom.org/viewtopic.php?t=62422
2018-11-01 16:05:27 +02:00
Christoph Oelckers
b9f2cce8de - versioned the return mismatch check to demote it to a warning for older versions than 3.7. 2018-11-01 11:30:53 +01:00
alexey.lysiuk
d3461be40c - made 'return void' case a compilation error 2018-11-01 11:18:22 +01:00
Magnus Norddahl
295fc7d7f7 Revert "- the build tests are using some ancient dino 7.1 Windows SDK where UnwindInfoAddress isn't part of the struct yet."
This reverts commit 20516e1c0b.
2018-10-17 08:54:41 +02:00
Magnus Norddahl
20516e1c0b - the build tests are using some ancient dino 7.1 Windows SDK where UnwindInfoAddress isn't part of the struct yet. 2018-10-15 03:06:40 +02:00
Magnus Norddahl
1f0add9067 - update JIT PARAM handling to match the VM instruction change 2018-10-14 23:13:30 +02:00
Magnus Norddahl
70f18f87b9 Merge remote-tracking branch 'origin/master' into asmjit 2018-10-14 22:55:57 +02:00
Magnus Norddahl
1a2e5b12d0 - RUNTIME_FUNCTION only exists in 64-bit Windows 2018-10-14 22:54:30 +02:00
Christoph Oelckers
dd719f0f14 - extended the register limit for 'param'.
The instruction one free instruction byte so it's now using that to extend its argument's register range to 65535.
For param this is needed because it passes strings by reference and creating an implicit temporary copy for string constants does not work here.
2018-10-14 09:13:26 +02:00
Magnus Norddahl
cd211da2d8 - fix wrong shift direction 2018-10-14 08:53:18 +02:00
Magnus Norddahl
a3f6950a4f - build enough of the unwind opcodes for visual studio's debugger to produce the correct call stack 2018-10-14 08:27:27 +02:00
Magnus Norddahl
cf9bae67a8 - construct our own runtime as the one provided by asmjit is too primitive 2018-10-14 00:46:54 +02:00
Magnus Norddahl
300553a21f - add more names to asmjit objects 2018-10-12 08:02:35 +02:00
Magnus Norddahl
7ca598de2d - remove the frameX registers as they were just constant offsets to vmframe that could be merged into other constant offsets 2018-10-12 07:41:16 +02:00
Magnus Norddahl
b15ca09486 - give the remaining virtual registers names 2018-10-12 07:05:42 +02:00
Magnus Norddahl
c86e4480b6 - give temp registers names and reuse the FString object for formatting names 2018-10-12 06:59:03 +02:00
Magnus Norddahl
0bb4a159e5 - skip RESULT opcodes when outputting assembly 2018-10-12 06:25:51 +02:00
Magnus Norddahl
44294a051a - clean up assembly output slightly by only generating labels for the opcodes jumped to 2018-10-12 06:14:27 +02:00
Magnus Norddahl
ade6ae24e9 - fix CASTB opcode implementation 2018-10-11 04:32:49 +02:00
Magnus Norddahl
fc870fce87 - fix missing convert from float to double in LSP and LSP_R opcodes
- fix missing convert from double to float in SSP and SSP_R opcodes
2018-10-11 03:53:11 +02:00
Magnus Norddahl
aa6e09f7e8 - fix debug build compile error 2018-10-11 03:14:42 +02:00
Magnus Norddahl
0120ea190c - remove the need to do any VARF_Native runtime checks by making native functions use the same calling convention as the script version 2018-10-10 23:47:56 +02:00
Magnus Norddahl
b6bc06e568 - do script calls directly from asmjit without using a lambda wrapper
- do VARF_Native check at compile time when possible
2018-10-10 22:08:26 +02:00
Magnus Norddahl
01825231ec - add -dumpjit command line parameter that dumps the JIT log for all functions to dumpjit.txt 2018-10-10 06:17:35 +02:00
Magnus Norddahl
452c6fd158 - fix return warning 2018-10-10 04:57:35 +02:00
Magnus Norddahl
884e185db0 - switch to using setjmp/longjmp for exception handling 2018-10-09 16:30:55 +02:00
Magnus Norddahl
2b05e75656 Merge branch 'asmjit' of https://github.com/coelckers/gzdoom into asmjit 2018-10-09 14:46:40 +02:00
Magnus Norddahl
3f4638ca31 - add disabled code that attempts to load registers directly from function arguments 2018-10-09 14:46:27 +02:00
Magnus Norddahl
9c3b8507af - add missing include statement 2018-10-09 07:15:46 +02:00
Magnus Norddahl
f0d9b49099 - allocate VMFrame on the stack for simple functions with no strings 2018-10-09 05:19:29 +02:00