From: Peter Johnson Date: Mon, 19 Nov 2001 05:48:04 +0000 (-0000) Subject: In bytecode_print(), fix checks for short/near opcode printouts. X-Git-Tag: v0.1.0~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f63877c076022f035a11df19679b0d10c084ee3;p=yasm In bytecode_print(), fix checks for short/near opcode printouts. svn path=/trunk/yasm/; revision=348 --- diff --git a/modules/arch/x86/bytecode.c b/modules/arch/x86/bytecode.c index ffc35ef6..d5176935 100644 --- a/modules/arch/x86/bytecode.c +++ b/modules/arch/x86/bytecode.c @@ -400,7 +400,7 @@ x86_bc_print(const bytecode *bc) printf("Target="); expr_print(jmprel->target); printf("\nShort Form:\n"); - if (!jmprel->shortop.opcode_len == 0) + if (jmprel->shortop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -408,7 +408,7 @@ x86_bc_print(const bytecode *bc) (unsigned int)jmprel->shortop.opcode[1], (unsigned int)jmprel->shortop.opcode[2], (unsigned int)jmprel->shortop.opcode_len); - if (!jmprel->nearop.opcode_len == 0) + if (jmprel->nearop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -437,7 +437,7 @@ x86_bc_print(const bytecode *bc) printf("UNKNOWN!!"); break; } - printf("BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", + printf(" BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", (unsigned int)jmprel->mode_bits, (unsigned int)jmprel->addrsize, (unsigned int)jmprel->opersize, diff --git a/modules/arch/x86/x86bc.c b/modules/arch/x86/x86bc.c index ffc35ef6..d5176935 100644 --- a/modules/arch/x86/x86bc.c +++ b/modules/arch/x86/x86bc.c @@ -400,7 +400,7 @@ x86_bc_print(const bytecode *bc) printf("Target="); expr_print(jmprel->target); printf("\nShort Form:\n"); - if (!jmprel->shortop.opcode_len == 0) + if (jmprel->shortop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -408,7 +408,7 @@ x86_bc_print(const bytecode *bc) (unsigned int)jmprel->shortop.opcode[1], (unsigned int)jmprel->shortop.opcode[2], (unsigned int)jmprel->shortop.opcode_len); - if (!jmprel->nearop.opcode_len == 0) + if (jmprel->nearop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -437,7 +437,7 @@ x86_bc_print(const bytecode *bc) printf("UNKNOWN!!"); break; } - printf("BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", + printf(" BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", (unsigned int)jmprel->mode_bits, (unsigned int)jmprel->addrsize, (unsigned int)jmprel->opersize, diff --git a/src/arch/x86/bytecode.c b/src/arch/x86/bytecode.c index ffc35ef6..d5176935 100644 --- a/src/arch/x86/bytecode.c +++ b/src/arch/x86/bytecode.c @@ -400,7 +400,7 @@ x86_bc_print(const bytecode *bc) printf("Target="); expr_print(jmprel->target); printf("\nShort Form:\n"); - if (!jmprel->shortop.opcode_len == 0) + if (jmprel->shortop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -408,7 +408,7 @@ x86_bc_print(const bytecode *bc) (unsigned int)jmprel->shortop.opcode[1], (unsigned int)jmprel->shortop.opcode[2], (unsigned int)jmprel->shortop.opcode_len); - if (!jmprel->nearop.opcode_len == 0) + if (jmprel->nearop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -437,7 +437,7 @@ x86_bc_print(const bytecode *bc) printf("UNKNOWN!!"); break; } - printf("BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", + printf(" BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", (unsigned int)jmprel->mode_bits, (unsigned int)jmprel->addrsize, (unsigned int)jmprel->opersize, diff --git a/src/arch/x86/x86bc.c b/src/arch/x86/x86bc.c index ffc35ef6..d5176935 100644 --- a/src/arch/x86/x86bc.c +++ b/src/arch/x86/x86bc.c @@ -400,7 +400,7 @@ x86_bc_print(const bytecode *bc) printf("Target="); expr_print(jmprel->target); printf("\nShort Form:\n"); - if (!jmprel->shortop.opcode_len == 0) + if (jmprel->shortop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -408,7 +408,7 @@ x86_bc_print(const bytecode *bc) (unsigned int)jmprel->shortop.opcode[1], (unsigned int)jmprel->shortop.opcode[2], (unsigned int)jmprel->shortop.opcode_len); - if (!jmprel->nearop.opcode_len == 0) + if (jmprel->nearop.opcode_len == 0) printf(" None\n"); else printf(" Opcode: %02x %02x %02x OpLen=%u\n", @@ -437,7 +437,7 @@ x86_bc_print(const bytecode *bc) printf("UNKNOWN!!"); break; } - printf("BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", + printf(" BITS=%u\nAddrSize=%u OperSize=%u LockRepPre=%02x\n", (unsigned int)jmprel->mode_bits, (unsigned int)jmprel->addrsize, (unsigned int)jmprel->opersize,