mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-09-05 19:28:58 +00:00
fix tester for BSF flags handling
This commit is contained in:
parent
62f9a4bbba
commit
6774a0821d
@ -3834,8 +3834,8 @@ static bool target_check_bsf(void)
|
||||
for (int g_OF = 0; g_OF <= 1; g_OF++) {
|
||||
for (int g_SF = 0; g_SF <= 1; g_SF++) {
|
||||
for (int value = -1; value <= 1; value++) {
|
||||
int flags = (g_SF << 7) | (g_OF << 11) | (g_ZF << 6) | g_CF;
|
||||
int tmp = value;
|
||||
unsigned long flags = (g_SF << 7) | (g_OF << 11) | (g_ZF << 6) | g_CF;
|
||||
unsigned long tmp = value;
|
||||
__asm__ __volatile__ ("push %0; popf; bsf %1,%1; pushf; pop %0"
|
||||
: "+r" (flags), "+r" (tmp) : : "cc");
|
||||
int OF = (flags >> 11) & 1;
|
||||
|
Loading…
Reference in New Issue
Block a user