1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-22 08:16:42 +00:00

Fix SHR overflow flag.

Failing: 11,802.
This commit is contained in:
Thomas Harte
2025-08-06 21:14:15 -04:00
parent a9a6aba862
commit 02ec1b5da6
2 changed files with 2 additions and 3 deletions
@@ -340,7 +340,7 @@ void shr(
return;
}
context.flags.template set_from<Flag::Overflow>(Numeric::top_bit<IntT>() & destination);
context.flags.template set_from<Flag::Overflow>(count == 1 && Numeric::top_bit<IntT>() & destination);
if(count == Numeric::bit_size<IntT>()) {
context.flags.template set_from<Flag::Carry>(Numeric::top_bit<IntT>() & destination);
destination = 0;
@@ -59,7 +59,6 @@ NSSet *const allowList = [NSSet setWithArray:@[
// @"AD.json.gz",
// @"AF.json.gz", // SCAS
// @"C0.2.json.gz",
// @"C0.5.json.gz",
// @"C6.json.gz",
// @"C7.json.gz",
// @"C8.json.gz", // ENTER
@@ -394,7 +393,7 @@ void apply_execution_test(
NSDictionary *metadata
) {
// NSLog(@"%@", test[@"hash"]);
if([test[@"hash"] isEqualToString:@"9a64f0b343d07c6526fa1f25664ab31f1488f561"]) {
if([test[@"hash"] isEqualToString:@"7e85d1ee9cca8399f15a25355012f18ee9958ddb"]) {
printf("");
}