--- nono/m680x0/m68030bus.cpp 2026/04/29 17:05:31 1.1.1.7 +++ nono/m680x0/m68030bus.cpp 2026/04/29 17:05:48 1.1.1.9 @@ -441,12 +441,12 @@ MPU68030Device::read_single(busdata bd, if (portsize == 2) { uint32 off2 = offset & 2; data |= bd.Data() << ((2 - off2) * 8); - set = 0x3 << (2 - off2); + set = 0x3U << (2 - off2); // 次の読み込みにむけて更新。 offset = 2 - off2; } else { data |= bd.Data() << ((3 - offset) * 8); - set = 0x1 << (3 - offset); + set = 0x1U << (3 - offset); // 次の読み込みにむけて更新。 offset = (offset + 1) & 3; } @@ -712,19 +712,14 @@ MPU68030Device::SetCACR(uint32 newval) // 命令キャッシュ有効 icache->enable = true; icache->hist.Clear(); + cycle_table = cycle_table_030cc; putlog(1, "I-Cache enabled"); } else { // 命令キャッシュ無効 icache->enable = false; + cycle_table = cycle_table_030ncc; putlog(1, "I-Cache disabled"); - // 命令キャッシュが有効だった期間 nocache は使われずに - // 積算され続けているが、キャッシュ無効になるとこれを加算 - // しようとするのでここでリセット。 - cycle_nocache = 0; } - - // 親クラス(自分) にもコピーを持っておく。core.cpp 参照。 - icache_enable = icache->enable; } // FI (命令キャッシュ凍結) @@ -841,7 +836,7 @@ m68030Cache::CalcStat() // 前回から今回までの間に disable になったのなら有効な値がある。 if (__predict_true(enable || total_read != 0)) { // ここはロックする。 - std::unique_lock lock(hist_mtx); + std::lock_guard lock(hist_mtx); hist.EnqueueForce(s); } }