| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
-cpu/drcbex86.cpp: Give hints to use short displacements for jumps to local unbound labels.
-util/mfpresolve.h: Use references for some things that must not be null pointers.
|
| |
|
|
|
|
|
|
|
|
| |
location.
* util/delegate.cpp, cpu/drcbex64.cpp, cpu/drcbearm64.cpp: Use common member function resolution code.
-cpu/drcbearm64.cpp, cpu/drcbex64.cpp, cpu/drcbex86.cpp: Moved some stuff to anonymous namespaces.
-cpu/drcbex64.cpp, cpu/drcbex86.cpp: Defer allocating labels if they aren't always needed.
|
| |
|
|
|
|
|
|
| |
* Got more slot card classes out of headers.
* Changed most of the Apple II cards still looking up ROM regions
manually to use required_region_ptr.
* Removed an unreferenced function leftover from copy-pasting another
device from the Videx Uniprint device.
|
| |
|
|
|
| |
* Turned `core_file` into an implementation of `random_read_write`.
* Turned PNG errors into a standard error category.
* Added a helper for generating what look like derived classes on-the-fly.
|
| |
|
|
|
|
|
|
|
|
| |
Added comments with V.24 interchange circuit numbers and names to
rs232.h to make the meanings of the abbreviated signal names clearer.
Moved a few slot card classes out of headers and into anonymous
namespaces to reduce compile depedencies and exported symbols.
Transliterated a Korean NES game title.
|
| |
|
|
| |
-util/delegate.cpp: Detect clang x86-64 thunk for first vtable entry.
|
| |
|
|
| |
-util/delegate.cpp: Fixed typo in comment.
|
| | |
|
| |
|
|
|
|
| |
At some point I'll make a proper header ABI detection. There's too much
stuff to keep in the delegate sources, and it will be useful for other
stuff like recompilers.
|
| |
|
|
| |
-util/delegate.cpp: Added a couple of comments about assumptions.
|
| |
|
|
|
|
|
|
| |
The MSVC C++ ABI doesn't reserve the first vtable entry for classes
without a virtual destructor, so the instruction to load the virtual
member function address may not need an immediate displacement.
Also recognise virtual member function call thunks for AArch64.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolve address space virtual member function addresses on constrcution
and call them directly. Provides a small but measurable improvement to
performance in drivers that use the recompiler and access the memory
system a lot.
Also made MSVC delegates capable of walking past all the thunks MSVC
puts in the way of actually calling a member function. I'm not
accounting for the "this" pointer being passed in RDX when the return
value is an oversize scalar. This is harmless because it won't see
anything that looks like a virtual call thunk using RCX when RCX points
to uninitialised space for the return value. It just means virtual
member function calls won't be bypassed if the return value is an
oversize scalar, but that doesn't happen frequently anyway.
|
| |
|
|
| |
function pointers across virtual inheritance relationships using MSVC with /vmg.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimised generation of late bind helper functions. The late bind
helper function doesn't depend on the delegate signature - only on the
late bind base class and function target class. Having it inside the
delegate base class means it needs to be instantiated for every
combination of late bind base class, function target class and delegate
signature. In a typical driver file, there is only one late bind base
class (delegate_late_bind), and there will be delegates with multiple
signatures bound to function members of the same class (e.g. read and
write handlers, possibly of different widths, bound to members of the
driver state class). By moving the late bind helper out of the delegate
base class, the number of required instantiations can be reduced. By
moving the body out of the enclosing class declaration, the compiler can
be encouraged to coalese instantiations across translation units. While
this won't give a further reduction in compile time, it should at least
reduce the output binary size by reducing duplication for devices that
frequently have handlers installed in memory maps.
Added an additional template parameter to delegates allowing the late
bind base class to be changed if desired.
Moved the MSVC implementation "this" pointer optimisation out-of-line
and added logging. Also cleaned up the Itanium "this" pointer
adjustment and code pointer resolution implementation to reduce
duplication and conditional compilation.
Made binding_type_exception give a more meaningful what() message than
"std::exception".
Added extensive validity tests for delegate functionality. Pointers to
member functions are tested, including multiple inheritance, virtual and
non-virtual member functions, and checking for generational loss across
copying/assigning delegates. This should properly exercise "this"
pointer adjustment for the Itanium and MSVC implementations, and vtable
lookup for the Itanium implementation. So-called late binding
functionality is tested, including exceptions on failure. Functoids are
tested, although given the encapsulation it's not possible to check that
an apator isn't generated when it shouldn't be.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed this pointer displacement being reapplied after delegates are
copied - caused issues with classes with multiple inheritance.
* Made null member function pointer test conformant with Itanium C++ ABI
specification.
* Corrected size of this pointer displacement - fixes issues on big
Endian targets.
* Fixed function addresses for virtual member functions on targets that
use function descriptors (e.g. PPC64).
* Applied shift to this pointer displacement for targets that use the
ARM variant of the Itanium ABI.
* Fixed this pointer displacement not being applied for virtual member
functions on targets using ARM variant of the Itanium ABI.
* Fixed this pointer displacement being incorrectly applied to vptr on
targets using ARM variant of the Itanium ABI.
* Made less code conditionally compiled to make it easier to catch
errors.
|
| |
|
|
|
|
|
|
|
|
|
| |
* util/strformat.h: Found a SFINAE trick to detect absence of stream-out
operators. Fixes building with C++20 standard library (#6275).
* util/delegate.h: Fixed a commend and removed an unused declaration
from MSVC member function pointer wrapper.
* util/delegate.h: Added support for discarding functoid return values
for delegates returning void.
* util/delegate.h: Added support for using std::ref to bind non-copyable
functoids.
|
| |
|
|
|
|
|
|
|
|
| |
* If a delegate is set to a functoid (e.g. a lambda) with a signature
that is an exact match for the delegate's signature, it will be bound
directly. If arguments or the return value need conversion, a static
adaptor will be generated. This removes unnecessary indirection
through std::function::operator().
-Added a few more documentation comments.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|