Magnus Norddahl
ae44b936eb
- add bool and unsigned int to the allowed types
...
- fix one case where floats were used (the JIT always calls with doubles)
2018-12-03 23:09:23 +01:00
Magnus Norddahl
ba0c7652eb
- perform compile time validation of direct native function signatures
2018-12-03 22:59:56 +01:00
Magnus Norddahl
5d9784f215
- fix VM native calls containing strings and enable them again
2018-12-03 21:58:01 +01:00
Magnus Norddahl
4f078dfcb3
- fix compile error
2018-12-03 21:57:07 +01:00
Christoph Oelckers
7df8245102
- added missing min/max unsigned instructions for the VM.
2018-12-03 21:12:39 +01:00
Christoph Oelckers
40a67b8c9a
- fixed issues with Dehacked's ad-hoc script code generation
...
* The functions had no prototype and caused crashes.
* even after creating a prototype it didn't work because CreateAnonymousFunction was set up incorrectly for the case where a known return type was given.
2018-12-03 12:24:55 +01:00
Christoph Oelckers
099b278f18
- removed assert that got triggered in an edge case that must pass here.
2018-12-02 23:35:18 +01:00
Magnus Norddahl
d88d173b38
- ptest is a SSE 4.1 instruction
2018-12-02 20:44:36 +01:00
Christoph Oelckers
ddaab4d2ab
- scriptified and cleaned up the AltHUD's DrawCoordinates, DrawTime and DrawLatency functions.
...
Some backing functionality was moved elsewhere because scripting should not have access to low level system information.
2018-12-02 14:34:09 +01:00
Christoph Oelckers
0cd93c14af
- allow %*d etc. format specifiers in ZScript, but only for numeric types.
2018-12-02 14:34:08 +01:00
Magnus Norddahl
edc05111cd
- don't use SSE for integer min/max
2018-12-02 09:58:08 +01:00
Magnus Norddahl
706a923884
- Use SSE2 for min/max instead
2018-12-02 07:35:02 +01:00
Christoph Oelckers
d812b94d57
- disabled direct native functions for now until the problems with string arguments are fixed.
2018-12-01 16:56:55 +01:00
Christoph Oelckers
691652042c
- added direct native variants to nearly all status bar function.
...
I skipped ValidateInvFirst because that one will have to be scriptified soon.
2018-12-01 16:54:31 +01:00
Magnus Norddahl
5169a5b119
- minor code cleanup now that it is working
2018-12-01 14:35:21 +01:00
Christoph Oelckers
85a3edf583
- removed the no longer needed exception prevention hack.
...
# Conflicts:
# src/scripting/vm/vmframe.cpp
2018-12-01 14:27:18 +01:00
Christoph Oelckers
067e9de00a
- fixed: V_FindFontColor is not suitable for direct calls from JIT code, thanks to its FName parameter.
2018-12-01 14:26:53 +01:00
Christoph Oelckers
aa32acae25
- a bit of code reordering for adding direct native entry points.
...
- offloaded key list generation for alternative HUD to non-UI parts.
This change also revealed a problem with handling empty sprites in the key list so this got fixed, too.
2018-12-01 14:18:28 +01:00
Magnus Norddahl
83c011740c
- fix augmentation length bug
2018-12-01 14:14:28 +01:00
Magnus Norddahl
b428136866
- unwind data is now working on macOS
2018-12-01 12:46:35 +01:00
Christoph Oelckers
a7e472b4b3
- moved all exports from class Font to vmthunks.cpp and gave them direct native entrypoints.
...
- changed PARAM_STRING to use the passed string by reference instead of by value. The 3 instances where passing by value was needed now use PARAM_STRING_VAL.
2018-12-01 10:30:50 +01:00
Christoph Oelckers
ea3d26aafd
- fixed character to int conversion for UTF8-characters.
2018-12-01 10:30:50 +01:00
Magnus Norddahl
c41603c171
- implemented unwind data on Unix - does it work? no idea, there's no easy way to tell when the debugger doesn't support the interface..
2018-12-01 01:14:15 +01:00
Christoph Oelckers
42b9a41421
- removed the longjmp based exception catch/rethrow mechanism and instead force-terminate in case a user exception is thrown while the VM is executing JITed code on a non-Windows system
...
On Windows none of this is needed, because we can generate a proper unwind frame for the JITed functions, but even on Linux, it would require manual additions to each single piece of native code that ever gets called from inside a JIT compiled function.
This is an utterly prohibitive proposition because it makes direct native calls a virtual impossibility
So, in order to get the thrown error properly presented both I_Error and ThrowAbortException will now forward to I_FatalError if it is called from inside a JIT context.
2018-11-30 21:30:14 +01:00
Christoph Oelckers
b26b16e4b7
Merge remote-tracking branch 'remotes/origin/master' into asmjit
2018-11-30 21:29:12 +01:00
Christoph Oelckers
a0c0e8bdfe
Merge remote-tracking branch 'remotes/origin/weapon_scriptification' into asmjit
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2018-11-30 21:28:44 +01:00
Christoph Oelckers
32f7e9a9ea
-add a dummy definition for vm_jit in 32 bit.
2018-11-30 20:50:31 +01:00
Player701
b79e3f8904
- Added a flag to make bouncing objects disappear when hitting sky surfaces
2018-11-30 18:53:57 +01:00
Magnus Norddahl
cb1153272a
- fix native call crash and assertion error
2018-11-30 16:55:22 +01:00
Magnus Norddahl
6e598274f7
- hook up unix unwind info (still not working)
2018-11-30 02:06:40 +01:00
Magnus Norddahl
b1bb82fe01
- fix WriteSLEB128
2018-11-29 19:44:26 +01:00
Magnus Norddahl
5d052fc565
- fix compile errors
2018-11-29 19:32:08 +01:00
Magnus Norddahl
37e33c6609
- implemented unwind info for Linux and macOS - now to fix the bugs that cannot be fixed when the documentation is as useless as it is for those platforms..
2018-11-29 18:45:55 +01:00
Christoph Oelckers
19df662348
- fixed code generation for dummy results.
2018-11-29 20:15:53 +01:00
Christoph Oelckers
b8394b2f16
- fixed compilation warnings.
2018-11-29 20:11:28 +01:00
Christoph Oelckers
717912c88c
- direct native methods for dynamic arrays.
2018-11-29 20:09:41 +01:00
Christoph Oelckers
53d59559cd
Added direct native functions to the remaining content of vmthunks.cpp
2018-11-29 17:55:56 +01:00
Christoph Oelckers
62efe11a85
- more direct native functions for sector utilities.
2018-11-29 17:38:58 +01:00
Magnus Norddahl
e3c13fe193
- Emit DW_CFA_advance_loc and DW_CFA_def_cfa_offset codes
2018-11-29 02:37:58 +01:00
Christoph Oelckers
f43f0b9bd4
- added a few more direct native entry points.
2018-11-29 00:27:09 +01:00
Christoph Oelckers
d3ff657231
- added a direct native function for NextHighestCeilingAt to test multiple return values.
2018-11-28 21:40:56 +01:00
Magnus Norddahl
5ae456d059
- fix typo in macro
2018-11-28 19:59:35 +01:00
Magnus Norddahl
232c24e4de
- add .eh_frame generation code except for building the actual CIE and FDE instructions
2018-11-28 13:10:31 +01:00
Christoph Oelckers
fc7ca39927
- allocate storage for all of a function's return values
2018-11-28 00:24:50 +01:00
Christoph Oelckers
6a9696e525
- moved the remaining exports from p_sectors.cpp to vmthunks.cpp
2018-11-28 00:24:50 +01:00
Magnus Norddahl
8860517bbd
- pass additional return values as the last args to a direct native call
2018-11-27 20:43:35 +01:00
Magnus Norddahl
3202c86ea7
- use the OP_PARAM and OP_RESULT opcodes to build the function signature
2018-11-27 19:56:39 +01:00
Christoph Oelckers
5e4e9e2c2b
Merge branch 'master' into asmjit
2018-11-27 19:53:22 +01:00
Christoph Oelckers
59b4e297c0
- fixed the mapping of additive translucency to color-based translucency.
...
The destination mode sould be 'One', not 'InvSrcColor'.
Now both of these are available as explicit modes, not just through the optional mapping.
2018-11-27 19:43:10 +01:00
Magnus Norddahl
d5b9b8e57a
- fixed missing setRet call for REGT_POINTER return types
2018-11-27 17:10:20 +01:00