[llvm-commits] [llvm] r150305 - in /llvm/trunk/lib/Target/X86/Disassembler: X86DisassemblerDecoder.c X86DisassemblerDecoder.h
Benjamin Kramer
benny.kra at googlemail.com
Sat Feb 11 08:01:02 PST 2012
Author: d0k
Date: Sat Feb 11 10:01:02 2012
New Revision: 150305
URL: http://llvm.org/viewvc/llvm-project?rev=150305&view=rev
Log:
Don't mix declarations and code.
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c?rev=150305&r1=150304&r2=150305&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c Sat Feb 11 10:01:02 2012
@@ -826,7 +826,7 @@
const struct InstructionSpecifier *spec;
uint16_t instructionIDWithOpsize;
- const struct InstructionSpecifier *specWithOpsize;
+ const char *specName, *specWithOpSizeName;
spec = specifierForUID(instructionID);
@@ -843,15 +843,13 @@
return 0;
}
- specWithOpsize = specifierForUID(instructionIDWithOpsize);
-
- const char *specName = x86DisassemblerGetInstrName(instructionID, miiArg);
- const char *specWithOpSizeSizeName =
+ specName = x86DisassemblerGetInstrName(instructionID, miiArg);
+ specWithOpSizeName =
x86DisassemblerGetInstrName(instructionIDWithOpsize, miiArg);
- if (is16BitEquvalent(specName, specWithOpSizeSizeName)) {
+ if (is16BitEquvalent(specName, specWithOpSizeName)) {
insn->instructionID = instructionIDWithOpsize;
- insn->spec = specWithOpsize;
+ insn->spec = specifierForUID(instructionIDWithOpsize);
} else {
insn->instructionID = instructionID;
insn->spec = spec;
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h?rev=150305&r1=150304&r2=150305&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h Sat Feb 11 10:01:02 2012
@@ -20,7 +20,7 @@
extern "C" {
#endif
-#define INSTRUCTION_SPECIFIER_FIELDS \
+#define INSTRUCTION_SPECIFIER_FIELDS
#define INSTRUCTION_IDS \
unsigned instructionIDs;
More information about the llvm-commits
mailing list