[llvm-commits] [llvm] r163594 - in /llvm/trunk: lib/Target/X86/Disassembler/X86Disassembler.h lib/Target/X86/Disassembler/X86DisassemblerDecoder.h utils/TableGen/X86DisassemblerTables.cpp
Craig Topper
craig.topper at gmail.com
Mon Sep 10 21:19:21 PDT 2012
Author: ctopper
Date: Mon Sep 10 23:19:21 2012
New Revision: 163594
URL: http://llvm.org/viewvc/llvm-project?rev=163594&view=rev
Log:
Change unsigned to a uint16_t in static disassembler tables to reduce the table size.
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h?rev=163594&r1=163593&r2=163594&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h Mon Sep 10 23:19:21 2012
@@ -78,7 +78,7 @@
uint16_t operands;
#define INSTRUCTION_IDS \
- unsigned instructionIDs;
+ uint16_t instructionIDs;
#include "X86DisassemblerDecoderCommon.h"
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=163594&r1=163593&r2=163594&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h Mon Sep 10 23:19:21 2012
@@ -24,7 +24,7 @@
uint16_t operands;
#define INSTRUCTION_IDS \
- unsigned instructionIDs;
+ uint16_t instructionIDs;
#include "X86DisassemblerDecoderCommon.h"
Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp?rev=163594&r1=163593&r2=163594&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp (original)
+++ llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Mon Sep 10 23:19:21 2012
@@ -366,6 +366,10 @@
break;
}
+ // We assume that the index can fit into uint16_t.
+ assert(sEntryNumber < 65536U &&
+ "Index into ModRMDecision is too large for uint16_t!");
+
++sTableNumber;
}
More information about the llvm-commits
mailing list