[VPlan] Move getConstantStride to vputils (NFC). (#224972)
Move the helper from VPlanTransforms.cpp to vputils, so it can also be
used from other VPlan files.
[orc-rt] msvc portability (#224512)
1. designated initializers are not supported under c++17 in msvc. Clang
seems to support them.
2. Fixed constexpr issues requiring everything to be constexpr in msvc.
Mostly the bit changes.
3. Add stubs for all the platform specific code, they will land in
separate patches.
4. Enabling RTTI/Exceptions for lib and tests.
5. Disable and fix up tests so they can compile and pass, future PRs
will enable and make work properly.
6. Fixed some protection issues in simpleCA.
7. Removed posix only files and darwin only files.
Various other small fixes as necessary to get compiling.
LoongArch: Simplify handling of call pseudo operands when expanding. (#224824)
copyImplicitOperands isn't really intended for the call instruction case
where there are also variadic operands. This avoids duplicating the R1
implicit-def operand when expanding calls. This avoids having mixed dead
and not dead flags on the same register, which will fail a future
verifier check.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
powerpc/radix: acquire the pmap lock in mmu_radix_extract()
mmu_radix_extract() walks the page tables without holding the pmap lock,
unlike its hash MMU counterpart moea64_extract(). A concurrent unmap can
free and recycle the page table page being walked, so the read returns
whatever now occupies that memory and the caller gets a physical address
that never existed.
That is how mmu_radix_sync_icache() came to hand a bogus address to
__syncicache() and panic the machine. Commit 1574ca1955f5 worked around
it by taking the pmap lock in mmu_radix_sync_icache(), but the machine
independent callers of pmap_extract() - vm_sync_icache(), proc_rwmem()
and the vslock() paths - remain exposed to the same failure.
Rename the existing body to mmu_radix_extract_locked(), which asserts the
lock, and make mmu_radix_extract() a thin wrapper that acquires it.
mmu_radix_sync_icache() already holds the pmap lock, so it calls the
locked variant directly and neither recurses nor reacquires the lock once
per page.
[7 lines not shown]
powerpc/radix: take the pmap lock in mmu_radix_sync_icache()
mmu_radix_sync_icache() walked the page tables with an unlocked
pmap_extract() and passed the result straight to PHYS_TO_DMAP(),
checking only that it was non-zero. Nothing keeps the mapping - or the
page table page holding it - alive across that window: if another thread
of the same process tears a mapping down concurrently, the page table
page can be freed and reused, so pmap_extract() reads arbitrary memory
and returns a bogus physical address. __syncicache() then dereferences
an unmapped direct map address and the kernel takes a data storage
interrupt:
fatal kernel trap:
exception = 0x300 (data storage interrupt)
virtual address = 0xc003317ca6022a00
dsisr = 0x40000000
srr0 = 0xc000000000f59460 (__syncicache)
lr = 0xc000000000f23588 (mmu_radix_sync_icache)
pid = 23878, comm = skyframe-evaluator-
[27 lines not shown]
[CIR] Unreacheable blocks should be target lowered (#224609)
Similar to CXXABILowering and LowerToLLVM, target lowering should also
transform unreacheable blocks to avoid legalization failures.
sameboy: update to 1.0.3.
Fixes build on -current.
Version 1.0.3
New/Improved Features
Added support for more controllers in the iOS frontend, including singular Joy-Cons
Pressing buttons while in a locked rewind state now exits rewind mode in the iOS frontend
The iOS frontend now handles save conflicts with a dialog, making syncing saves across different machines and emulators easier
An examine/x command can now use the /s modifier to change its output style to RGBDS-compatible assembly
An examine/x command can now use $ in its modifier to use hexadecimal count values
It is now possible to adjust the maximum rumble strength
It is now possible to modify and save a running ROM file from the Memory Viewer in the Cocoa frontend
Controller buttons can now be assigned to one of 4 hotkey commands in the iOS frontend
Periodic saves were added to the iOS frontend
A new screenshot hotkey was added to the SDL frontend
Controller UI hiding in the iOS frontend can now optionally disable the centering of the game screen
[468 lines not shown]