37 karma · joined December 2, 2021
Game consoles like NES, SNES and Game Boy had additional hardware built in the cartridge to support memory mapping/bank switching.
For PCs, EMS (memory) provided a similar concept. It reserved a 64 kB window divided in 16 kB pages in the first 1 MB and allowed to map up to 32 MB.
> Emulating the last two in software is possible (and seems to be supported by Rosetta 2 for Linux), but can be rather expensive. Most software won’t notice if you get these wrong, but some software will. The Apple M1 has an undocumented extension that, when enabled, ensures instructions like ADDS, SUBS and CMP compute PF and AF and store them as bits 26 and 27 of NZCV respectively, providing accurate emulation with no performance penalty.
https://dougallj.wordpress.com/2022/11/09/why-is-rosetta-2-f...
https://devblogs.microsoft.com/dotnet/performance-improvemen...
* https://devblogs.microsoft.com/dotnet/performance-improvemen...
Sounds a lot like the PowerPC's rlwinm instruction.
The PowerPC 600 series, part 5: Rotates and shifts
https://devblogs.microsoft.com/oldnewthing/20180810-00/?p=99...
> Beginning with processors based on Ivy Bridge microarchitecture, REP string operation using MOVSB and STOSB can provide both flexible and high-performance REP string operations for software in common situations like memory copy and set operations.
> Beginning with processors based on Ice Lake Client microarchitecture, REP MOVSB performance of short operations is enhanced. The enhancement applies to string lengths between 1 and 128 bytes long.
* https://www-ssl.intel.com/content/www/us/en/architecture-and...
* Book: https://link.springer.com/book/10.1007/978-1-4842-4063-2