[libbluray-devel] [Git][videolan/libbluray][master] hdmv: fix INSN_BC instruction
Petri Hintukainen (@hpi)
gitlab at videolan.org
Fri Aug 21 17:32:22 UTC 2026
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
ea3e318b by Hendrik Leppkes at 2026-08-21T17:08:57+00:00
hdmv: fix INSN_BC instruction
The condition was backwards, checking if any bits outside of the desired
are set, rather then the desired bits.
This still differs from the specification which just indicates a simple
AND check, however the spec does also not indicate if the result should
be checked to be non-zero, or matching the input.
This version is likely what was originally intended, however all discs
that were found to use the BC instruction only test a single bit, making
the difference between a full or partial match not testable.
- - - - -
1 changed file:
- src/libbluray/hdmv/hdmv_vm.c
Changes:
=====================================
src/libbluray/hdmv/hdmv_vm.c
=====================================
@@ -1134,7 +1134,7 @@ static int _hdmv_step(HDMV_VM *p)
BD_DEBUG(DBG_HDMV|DBG_CRIT, "missing operand in BRANCH/JUMP opcode 0x%08x\n", *(uint32_t*)insn);
}
switch (insn->cmp_opt) {
- case INSN_BC: p->pc += !!(dst & ~src); break;
+ case INSN_BC: p->pc += !!(src & ~dst); break;
case INSN_EQ: p->pc += !(dst == src); break;
case INSN_NE: p->pc += !(dst != src); break;
case INSN_GE: p->pc += !(dst >= src); break;
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/ea3e318b89c42d2eff2ce0b9d78dc2371fbb6a67
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/ea3e318b89c42d2eff2ce0b9d78dc2371fbb6a67
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libbluray-devel
mailing list