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

Unified Diff: src/trusted/validator/x86/testing/enuminsts/text2hex.h

Issue 9861030: Modify enuminsts to be able to communicate matched instructions accross (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 9 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/testing/enuminsts/text2hex.h
===================================================================
--- src/trusted/validator/x86/testing/enuminsts/text2hex.h (revision 0)
+++ src/trusted/validator/x86/testing/enuminsts/text2hex.h (revision 0)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/*
+ * text2bytes.h
Brad Chen 2012/03/28 17:26:43 Doesn't match filename. Maybe simpler just to omit
+ * Hexidecimal text to bytes conversion tools.
+ */
+
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_ENUMINSTS_TEXT2BYTES_H_
+#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_ENUMINSTS_TEXT2BYTES_H_
+
+#include "native_client/src/trusted/validator/x86/testing/enuminsts/enuminsts.h"
+
+/* Reads a line of text defining the sequence of bytes that defines
+ * an instruction, and converts that to the corresponding sequence of
+ * opcode bytes. Returns the number of bytes found. Returning zero implies
+ * that no instruction opcode was found in the given text.
+ * Arguments are:
+ * ibytes - The found sequence of opcode bytes.
+ * itext - The sequence of bytes to convert.
+ * context - String describing the context (i.e. filename or
+ * command line argument description).
+ * line - The line number associated with the context (if negative,
+ * it assumes that the line number shouldn't be reported).
+ */
+extern int Text2Bytes(uint8_t ibytes[NACL_ENUM_MAX_INSTRUCTION_BYTES],
+ char* itext,
Brad Chen 2012/03/28 17:26:43 const?
Karl 2012/03/28 18:25:28 Done.
+ const char* context,
+ int line);
+
+#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_ENUMINSTS_INPUT_TESTER_H_ */

Powered by Google App Engine
This is Rietveld 408576698