Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: src/trusted/validator/x86/decoder/ncopcode_desc.c

Issue 7980021: Speed up x86-64 validator by inlining heavily called routines. Speeds up (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator/x86/decoder/ncopcode_desc.c
===================================================================
--- src/trusted/validator/x86/decoder/ncopcode_desc.c (revision 6742)
+++ src/trusted/validator/x86/decoder/ncopcode_desc.c (working copy)
@@ -19,6 +19,8 @@
#include "native_client/src/trusted/validator/x86/decoder/gen/ncopcode_operand_flag_impl.h"
#include "native_client/src/trusted/validator/x86/decoder/nc_decode_tables.h"
+#include "native_client/src/trusted/validator/x86/decoder/ncopcode_desc_inl.c"
+
uint8_t NaClGetOpcodeInModRm(uint8_t opcode_ext) {
return opcode_ext & 0x0F;
}
@@ -32,13 +34,12 @@
}
uint8_t NaClGetInstNumberOperands(const NaClInst* inst) {
- return inst->num_operands;
+ return NaClGetInstNumberOperandsInline(inst);
}
const NaClOp* NaClGetInstOperand(const NaClDecodeTables* tables,
const NaClInst* inst, uint8_t index) {
- assert(index < inst->num_operands);
- return &tables->operands_table[inst->operands_offset + index];
+ return NaClGetInstOperandInline(tables, inst, index);
}
/* Print out the opcode operand flags in a simplified (i.e. more human readable)
« no previous file with comments | « src/trusted/validator/x86/decoder/ncop_exps_inl.c ('k') | src/trusted/validator/x86/decoder/ncopcode_desc_inl.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698