summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/drcbex64.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2026-01-04 14:18:18 +1100
committer GitHub <noreply@github.com>2026-01-04 14:18:18 +1100
commit2209d46c9477c638eba937516b63dd71a01328db (patch)
tree8fbfa21bd53c4f1f334c3a5b0c3d2bfeace2e401 /src/devices/cpu/drcbex64.cpp
parent5784c8ac521970b432c05385cc829e17358467be (diff)
cpu/drccache.cpp: Defer allocating to start, allow forcing W^X mode. (#14760)
cpu/drccache.cpp: Added helpers for allocating structures/objects in the cache. cpu/drccache.cpp: Supply desired alignment when allocating cache memory (not fully implemented). cpu/drccache.cpp: Log some statistics on destruction. emu/emuopts.cpp: Added -[no]drc_rwx option to allow forcing W^X mode when writable executable pages are permitted. cpu/mips, cpu/powerpc: Allow DRC cache size to be set externally at configuration time, so systems can override the default. cpu/dspp, cpu/e132xs, cpu/unsp: Don't allocate DRC resources if recompiler is disabled.
Diffstat (limited to 'src/devices/cpu/drcbex64.cpp')
-rw-r--r--src/devices/cpu/drcbex64.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index b916919aa91..953da55b247 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -1014,14 +1014,14 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, u
, m_log_asmjit(nullptr)
, m_lzcnt(false)
, m_bmi(false)
- , m_absmask32((u32 *)cache.alloc_near(16*2 + 15))
+ , m_absmask32((u32 *)cache.alloc_near(16*2 + 15, std::align_val_t(alignof(u32))))
, m_absmask64(nullptr)
, m_rbpvalue(cache.near() + 0x80)
, m_entry(nullptr)
, m_exit(nullptr)
, m_nocode(nullptr)
, m_endofblock(nullptr)
- , m_near(*(near_state *)cache.alloc_near(sizeof(m_near)))
+ , m_near(*cache.alloc_near<near_state>())
{
// check for optional CPU features
const auto &x86_features = CpuInfo::host().features().x86();