summaryrefslogtreecommitdiff
path: root/src/common/x64 (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-24Rework time service to fix time passing offline.Gravatar Kelebek12-21/+14
2023-06-28x64: cpu_wait: Implement MWAITX for non-MSVC compilersGravatar Morph1-0/+10
2023-06-28x64: cpu_wait: Remove magic valuesGravatar Morph1-3/+8
2023-06-28x64: cpu_wait: Make use of MWAITX in MicroSleepGravatar Morph1-12/+21
MWAITX is equivalent to UMWAIT on Intel's Alder Lake CPUs. We can emulate TPAUSE by using MONITORX in conjunction with MWAITX to wait for 100K cycles.
2023-06-28x64: Add detection of monitorx instructionsGravatar Morph2-0/+2
monitorx introduces 2 instructions: MONITORX and MWAITX.
2023-06-07(wall, native)_clock: Add GetGPUTickGravatar Morph2-1/+9
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
2023-06-07(wall, native)_clock: Rework NativeClockGravatar Morph2-181/+40
2023-06-07x64: Deduplicate RDTSC usageGravatar Morph4-19/+80
2023-03-27x64: Simplify RDTSC on non-MSVC compilersGravatar Morph2-16/+10
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2023-03-27x64: Add MicroSleepGravatar Morph2-0/+82
MicroSleep allows the processor to pause for a "short" amount of time (in the microsecond range). This is useful for spin-waiting that does not require nanosecond precision. This uses the new TPAUSE instruction introduced on Intel's newest processors as part of the waitpkg instructions. For CPUs that do not support waitpkg instructions, this is equivalent to yield(). Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2023-03-27x64: cpu_detect: Add detection of waitpkg instructionsGravatar Morph2-0/+2
waitpkg introduces 3 instructions, UMONITOR, UMWAIT and TPAUSE.
2023-03-07native_clock: Wait for 10 seconds instead of 30Gravatar Morph1-3/+3
It was experimentally determined to be sufficient.
2023-03-07native_clock: Use RealTimeClock instead of SteadyClockGravatar Morph1-4/+4
We want to synchronize RDTSC to real time.
2023-03-07native_clock: Re-adjust the RDTSC frequencyGravatar Morph2-5/+34
The RDTSC frequency reported by CPUID is not accurate to its true frequency. We will spawn a separate thread to calculate the true RDTSC frequency after a measurement period of 30 seconds has elapsed.
2023-03-05native_clock: Round RDTSC frequency to the nearest 1000Gravatar Morph1-5/+12
2022-11-11Add CPU core count to log filesGravatar Matías Locatti2-3/+60
2022-07-27Revert Coretiming PRs 8531 and 7454 (#8591)Gravatar Maide1-1/+1
2022-07-27chore: make yuzu REUSE compliantGravatar Andrea Pappacoda2-6/+4
[REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-07-06guard against div-by-zeroGravatar Marshall Mohror1-2/+5
2022-07-06common/x64: Use TSC clock rate from CPUID when availableGravatar Marshall Mohror2-0/+18
The current method used to estimate the TSC is fairly accurate - within a few kHz - but the exact value can be extracted from CPUID if available.
2022-06-30Adress Feedback.Gravatar Fernando Sahmkow1-1/+0
2022-06-28Native clock: Use atomic ops as before.Gravatar Fernando Sahmkow2-24/+29
2022-06-28Native Clock: remove inaccuracy mask.Gravatar Fernando Sahmkow2-6/+1
2022-06-28Core: Fix tests.Gravatar Fernando Sahmkow1-0/+1
2022-06-28Common: improve native clock.Gravatar Fernando Sahmkow2-29/+24
2022-04-23general: Convert source file copyright comments over to SPDXGravatar Morph4-10/+10
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-03native_clock: Internal linkage for FencedRDTSCGravatar Merry1-2/+4
__forceinline required on MSVC for function to be inlined
2022-04-03native_clock: Use lfence with rdtscGravatar merry1-14/+33
2022-04-02native_clock: Use writeback from CAS to avoid double-loadingGravatar merry1-4/+6
2022-04-02native_clock: Use AtomicLoad128Gravatar Merry1-2/+2
2022-03-19common: Reduce unused includesGravatar ameerj3-5/+0
2022-03-11cpu_detect: Add additional x86 flags and telemetryGravatar Wunkolo2-11/+40
Adds detection of additional CPU flags to cpu_detect and additions to telemetry output. This is not exhaustive but guided by features that [dynarmic utilizes](https://github.com/merryhime/dynarmic/blob/bcfe377aaa5138af740e90af5be7a7dff7b62a52/src/dynarmic/backend/x64/host_feature.h#L12-L33) as well as features that are currently utilized but not reported to telemetry(invariant_tsc). This is intended to guide future optimizations. AVX512 in particular is broken up into its individual subsets and some other processor features such as [sha](https://en.wikipedia.org/wiki/Intel_SHA_extensions) and [gfni](https://en.wikipedia.org/wiki/AVX-512#GFNI) are added to have some forward-facing data-points. What used to be a single `CPU_Extension_x64_AVX512` telemetry field is also broken up into individual `CPU_Extension_x64_AVX512{F,VL,CD,...}` fields.
2022-03-09cpu_detect: Revert `__cpuid{ex}` array-type argumentGravatar Wunkolo1-6/+6
Restores compatibility with MSVC's `__cpuid` intrinsic.
2022-03-09cpu_detect: Add missing `lzcnt` detectionGravatar Wunkolo1-0/+1
2022-03-09cpu_detect: Refactor cpu/manufacturer identificationGravatar Wunkolo2-24/+38
Set the zero-enum value to Unknown Move the Manufacterer enum into the CPUCaps structure namespace Add "ParseManufacturer" utility-function Fix cpu/brand string buffer sizes(!)
2022-03-09cpu_detect: Update array-types to `span` and `array`Gravatar Wunkolo1-11/+13
Update some uses of `int` into some more explicitly sized types as well
2022-03-09cpu_detect: Utilize `Bit<N>` utility functionGravatar Wunkolo1-32/+20
2022-03-09cpu_detect: Compact capability fieldsGravatar Wunkolo1-20/+21
As this structure gets more explicit, bools can be bitfields and small enums can use smaller types for their span of values.
2022-01-30common: wall_clock: Utilize constants for ms, us, and ns ratiosGravatar Morph1-3/+3
2022-01-26common/xbyak_api: Make BuildRegSet() constexprGravatar Lioncash1-8/+8
This allows us to eliminate any static constructors that would have been emitted due to the function not being constexpr.
2021-12-13common/cpu_detect: Remove CPU family and modelGravatar Morph1-12/+0
We currently do not make use of these fields, remove them for now.
2021-12-03native_clock: Wait for less time in EstimateRDTSCFrequencyGravatar Morph1-18/+18
In my testing, waiting for 200ms provided the same level of precision as the previous implementation when estimating the RDTSC frequency. This significantly improves the yuzu executable launch times since we reduced the wait time from 3 seconds to 200 milliseconds.
2021-12-02general: Replace high_resolution_clock with steady_clockGravatar Morph1-3/+3
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-08-15xbyak: Update include pathGravatar Merry2-2/+2
2021-02-15common: Merge uint128 to a single header file with inlines.Gravatar bunnei1-58/+0
2021-01-02X86/NativeClock: Reimplement RTDSC access to be lock free.Gravatar Fernando Sahmkow2-22/+41
2021-01-02X86/NativeClock: Improve performance of clock calculations on hot path.Gravatar Fernando Sahmkow2-5/+71
2020-12-05xbyak_abi: Shorten std::size_t to size_tGravatar Lioncash1-8/+8
Makes for less reading.
2020-12-05xbyak_abi: Avoid implicit sign conversionsGravatar Lioncash1-2/+2
2020-12-03audio_core: Make shadowing and unused parameters errorsGravatar Lioncash2-5/+6
Moves the audio code closer to enabling warnings as errors in general.