Commit graph

16 commits

Author SHA1 Message Date
Akatsuki Levi 70d0df5e55
fix: Clang fix part 2: Electric bogaloo 2024-03-15 21:05:43 -03:00
Akatsuki Levi 94a84f5943
fix: CLang fix 2024-03-15 21:03:47 -03:00
ddutchie 5d8f3f7cb1 Revert "Quality-of-Life Improvements" 2024-03-15 22:26:16 +00:00
Levi Akatsuki e1538413e9 Quality-of-Life Improvements 2024-03-15 21:48:09 +00:00
JuanCStar 18baf880c4 fix: clang format 2024-03-12 09:13:35 +01:00
Levi Akatsuki e5a954617b Improved Addons Manager 2024-03-12 04:30:44 +00:00
Crimson Hawk cdbdf63ebe Revert "Merge branch 'master' into 'dev'"
This reverts merge request !17
2024-03-06 05:26:38 +00:00
AMA2581 5720814b13 modifying all the files to match the app 2024-03-06 00:19:07 +03:30
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
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.
2022-04-23 05:55:32 -04:00
ameerj 923decae5a common: Reduce unused includes 2022-03-19 15:01:31 -04:00
ReinUsesLisp b3587102d1 core/memory: Read and write page table atomically
Squash attributes into the pointer's integer, making them an uintptr_t
pair containing 2 bits at the bottom and then the pointer. These bits
are currently unused thanks to alignment requirements.

Configure Dynarmic to mask out these bits on pointer reads.

While we are at it, remove some unused attributes carried over from
Citra.

Read/Write and other hot functions use a two step unpacking process that
is less readable to stop MSVC from emitting an extra AND instruction in
the hot path:

 mov         rdi,rcx
 shr         rdx,0Ch
 mov         r8,qword ptr [rax+8]
 mov         rax,qword ptr [r8+rdx*8]
 mov         rdx,rax
-and         al,3
 and         rdx,0FFFFFFFFFFFFFFFCh
 je          Core::Memory::Memory::Impl::Read<unsigned char>
 mov         rax,qword ptr [vaddr]
 movzx       eax,byte ptr [rdx+rax]
2020-12-29 21:54:49 -03:00
Lioncash 412044960a virtual_buffer: Do nothing on resize() calls with same sizes
Prevents us from churning memory by freeing and reallocating a memory
block that would have already been adequate as is.
2020-11-19 07:54:03 -05:00
Lioncash 0ca91ced2d virtual_buffer: Add compile-time type-safety guarantees with VirtualBuffer
VirtualBuffer makes use of VirtualAlloc (on Windows) and mmap() (on
other platforms). Neither of these ensure that non-trivial objects are
properly constructed in the allocated memory.

To prevent potential undefined behavior occurring due to that, we can
add a static assert to loudly complain about cases where that is done.
2020-11-17 20:09:58 -05:00
Lioncash b3c8997829 page_table: Allow page tables to be moved
Makes page tables and virtual buffers able to be moved, but not copied,
making the interface more flexible.

Previously, with the destructor specified, but no move assignment or
constructor specified, they wouldn't be implicitly generated.
2020-11-17 20:08:20 -05:00
Lioncash df72480395 common: Make use of [[nodiscard]] where applicable
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
2020-08-15 17:17:52 -04:00
bunnei 4ba2428c86 common: Add VirtualBuffer class, to abstract memory virtualization. 2020-04-17 00:59:31 -04:00