| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for core stuff:
just remove unique ptrs that dont need any pointer stability at all (afterall its an allocation within an allocation so yeah)
for fibers:
Main reasoning behind this is because virtualBuffer<> is stupidly fucking expensive and it also clutters my fstat view
ALSO mmap is a syscall, syscalls are bad for performance or whatever
ALSO std::vector<> is better suited for handling this kind of "fixed size thing where its like big but not THAT big" (512 KiB isn't going to kill your memory usage for each fiber...)
for core.cpp stuff
- inlines stuff into std::optional<> as opposed to std::unique_ptr<> (because yknow, we are making the Impl from an unique_ptr, allocating within an allocation is unnecessary)
- reorganizes the structures a bit so padding doesnt screw us up (it's not perfect but eh saves a measly 44 bytes)
- removes unused/dead code
- uses std::vector<> instead of std::deque<>
no perf impact expected, maybe some initialisation boost but very minimal impact nonethless
lto gets rid of most calls anyways - the heavy issue is with shared_ptr and the cache coherency from the atomics... but i clumped them together because well, they kinda do not suffer from cache coherency - hopefully not a mistake
this balloons the size of Impl to about 1.67 MB - which is fine because we throw it in the stack anyways
REST OF INTERFACES: most of them ballooned in size as well, but overhead is ok since its an allocation within an alloc, no stack is used (when it comes to storing these i mean)
Signed-off-by: lizzie lizzie@eden-emu.dev
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3306
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So when libc starts it has to start at an entry point located into crt0, now most OSes will do "enough" setup to allow mprotect() and mmap() to be called in static ctors (remember they're called BEFORE main)
By some stupid miracle, NetBSD doesn't; this means that using those functions on NetBSD will result in spurious results
The reason why is still unknown to me, but this is also combined with the fact that allocating a big chunk of memory for the JIT will make NetBSD refuse to mprotect()/mmap() it in low memory situations (even when space is available); so I take the same approach as with solaris
Also I now make it so fastmem handlers are NOT registered for OSes that disabled fastmem, this is because they pollute sigsegv and makes debugging stupidier
Signed-off-by: lizzie lizzie@eden-emu.dev
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3092
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
|
| |
|
|
|
|
| |
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/185
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
|
| |
|
|
| |
ABI parameter handling in macro_jit_x64.cpp
|
| |
|
|
|
|
|
|
|
|
|
| |
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.
I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw
R_THROW macro leads towards a return
|
| | |
|
| |\
| |
| | |
macro_jit_x64: cancel exit for taken branch
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
| |
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
|
| |
|
|
|
| |
This allows us to eliminate any static constructors that would have been
emitted due to the function not being constexpr.
|
| |
|
|
| |
Reduces the size of the impl class a tiny bit.
|
| |
|
|
| |
This doesn't depend on class state and can just be a regular function.
|
| |
|
|
|
|
|
| |
Keeps the implementation internalized and also reduces API-facing header
dependencies.
Notably, this fully internalizes all of the xbyak externals.
|
| |
|
|
|
|
|
| |
fmt now automatically prints the numeric value of an enum class member
by default, so we don't need to use casts any more.
Reduces the line noise a bit.
|
| |
|
|
|
|
| |
Resolves variable shadowing scenarios up to the end of the OpenGL code
to make it nicer to review. The rest will be resolved in a following
commit.
|
| |
|
|
|
|
|
|
|
| |
I made a request on the Xbyak issue tracker to allow some constructors
to be constexpr in order to avoid static constructors from needing to
execute for some of our register constants.
This request was implemented, so this updates Xbyak so that we can make
use of it.
|
| |
|
|
| |
Silences several compiler warnings about unused variables.
|
| | |
|
| |\
| |
| | |
video_core: Eliminate some variable shadowing
|
| | |
| |
| |
| |
| |
| |
| | |
We can reduce the capture scope so that it's not possible for both "reg"
variables to clash with one another.
While we're at it, we can prevent unnecessary copies while we're at it.
|
| | |
| |
| |
| | |
shl/shr only accept cl as their second argument
|
| |\ \
| | |
| | | |
macro_jit_x64: Amend readability of Compile_ExtractShiftLeftRegister()
|
| | | |
| | |
| | |
| | | |
Previously dst wasn't being used.
|
| | |/
| |
| |
| | |
Previously dst wasn't being used.
|
| |\ \
| | |
| | | |
macro_jit_x64: Remove unused variable
|
| | |/
| |
| |
| |
| | |
Removes a completely unused label and marks another variable as unused,
given it seems like it has potential uses in the future.
|
| |\ \
| |/
|/| |
macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue
|
| | | |
|
| | | |
|
| |\ \
| |/
|/| |
macro_jit_x64: Optimization correctness
|
| | | |
|
| | |
| |
| |
| | |
The code generated for these ALU ops assume src_a and src_b are always valid.
|
| |\ \
| |/
|/| |
xbyak_abi: Cleanup
|
| | | |
|
| | |
| |
| |
| | |
Not required, as PARAMETERS can just be incremented directly.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
All registers are now callee-save registers.
RBX and RBP selected for STATE and RESULT because these are most commonly accessed; this is to avoid the REX prefix.
RBP not used for STATE because there are some SIB restrictions, RBX emits smaller code.
|
| | |
| |
| |
| | |
Unnecessary since this is just an offset from STATE.
|
| | |
| |
| |
| | |
This can be passed in as an argument instead.
|
| | |
| |
| |
| | |
Unnecessary variable.
|
| |/
|
|
| |
This Reg64 codepath has the exact same behaviour as the Reg32 one.
|
| | |
|
| |
|
|
| |
Easier to read and will emit a jump table automatically.
|
| |
|