diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2019-04-01 06:03:58 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2019-04-01 06:03:58 +0000 |
commit | f6338cfc672c231f2f730aaae4f9e4f445b1149b (patch) | |
tree | 25147cb6249687d9beea2e3bc8072a4e1b73c504 | |
parent | 27366776e093c0be35643910b870557028c751b5 (diff) |
Repair "} if" and make it the intended "} else if", compare the corresponding
ror_*() functions. Also, the result doesn't actually change. ok deraadt@
-rw-r--r-- | sys/dev/x86emu/x86emu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/x86emu/x86emu.c b/sys/dev/x86emu/x86emu.c index 32bcf23c8f7..82c432d5a47 100644 --- a/sys/dev/x86emu/x86emu.c +++ b/sys/dev/x86emu/x86emu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x86emu.c,v 1.10 2018/11/25 19:52:08 jmc Exp $ */ +/* $OpenBSD: x86emu.c,v 1.11 2019/04/01 06:03:57 naddy Exp $ */ /* $NetBSD: x86emu.c,v 1.7 2009/02/03 19:26:29 joerg Exp $ */ /* @@ -7009,7 +7009,7 @@ rol_byte(struct x86emu *emu, uint8_t d, uint8_t s) CONDITIONAL_SET_FLAG(s == 1 && XOR2((res & 0x1) + ((res >> 6) & 0x2)), F_OF); - } if (s != 0) { + } else if (s != 0) { /* set the new carry flag, Note that it is the low order bit * of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); @@ -7035,7 +7035,7 @@ rol_word(struct x86emu *emu, uint16_t d, uint8_t s) CONDITIONAL_SET_FLAG(s == 1 && XOR2((res & 0x1) + ((res >> 14) & 0x2)), F_OF); - } if (s != 0) { + } else if (s != 0) { /* set the new carry flag, Note that it is the low order bit * of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); @@ -7061,7 +7061,7 @@ rol_long(struct x86emu *emu, uint32_t d, uint8_t s) CONDITIONAL_SET_FLAG(s == 1 && XOR2((res & 0x1) + ((res >> 30) & 0x2)), F_OF); - } if (s != 0) { + } else if (s != 0) { /* set the new carry flag, Note that it is the low order bit * of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); |