// The assembler uses all operand types. In addition to determining what
// kind of value an operand may be, non-concrete operand types capture the
// fact that an operand might be optional (may be absent, or present exactly
-// once), or might occure zero or more times.
+// once), or might occur zero or more times.
//
// Sometimes we also need to be able to express the fact that an operand
// is a member of an optional tuple of values. In that case the first member
} spv_diagnostic_t;
// Opaque struct containing the context used to operate on a SPIR-V module.
-// Its object is used by various tranformation API functions.
+// Its object is used by various translation API functions.
struct spv_context_t;
// Type Definitions
const size_t length, spv_binary* binary,
spv_diagnostic* diagnostic);
-// @brief Frees an allocated text stream. This is a no-op if the text parameter
+// Frees an allocated text stream. This is a no-op if the text parameter
// is a null pointer.
void spvTextDestroy(spv_text text);
// where each term is a named enum value for a given type. No whitespace
// is permitted.
//
- // On success, the value is written to pValue, and SPV_SUCCESS is returend.
+ // On success, the value is written to pValue, and SPV_SUCCESS is returned.
// The operand type is defined by the type parameter, and the text to be
// parsed is defined by the textValue parameter.
spv_result_t parseMaskOperand(const spv_operand_type_t type,
// of the given pattern.
//
// Each set bit in the mask represents zero or more operand types that should
- // be prepended onto the pattern. Opearnds for a less significant bit always
- // appear before operands for a more significatn bit.
+ // be prepended onto the pattern. Operands for a less significant bit always
+ // appear before operands for a more significant bit.
//
// If a set bit is unknown, then we assume it has no operands.
void prependOperandTypesForMask(const spv_operand_type_t type,
const spv_ext_inst_table ext_inst_table;
};
-/// @brief Populate the Opcode table
-///
-/// @param[out] pOpcodeTable table to be populated
-///
-/// @return result code
+// Populates the given opcode table.
spv_result_t spvOpcodeTableGet(spv_opcode_table* pOpcodeTable);
-/// @brief Populate the operand table
-///
-/// @param[in] pOperandTable table to be populated
-///
-/// @return result code
+// Populates the given operand table.
spv_result_t spvOperandTableGet(spv_operand_table* pOperandTable);
-/// @brief Populate the extended instruction table
-///
-/// @param pTable table to be populated
-///
-/// @return result code
+// Populates the given extended instruction table.
spv_result_t spvExtInstTableGet(spv_ext_inst_table* pTable);
#endif // LIBSPIRV_TABLE_H_
// Returns the next word in the input stream. It is invalid to call this
// method if position has been set to a location in the stream that does not
- // exist. If there are no subsequent words, the empty string will be returend.
+ // exist. If there are no subsequent words, the empty string will be returned.
std::string getWord() const;
// Returns true if the next word in the input is the start of a new Opcode.
return diagnostic(SPV_ERROR_INVALID_TEXT);
}
- // Returns then next characted in the input stream.
+ // Returns then next character in the input stream.
char peek() const;
// Returns true if there is more text in the input stream.
// 32-bit integer.
// Returns SPV_SUCCESS if the value could be correctly added to the
// instruction. Returns the given error code on failure, and emits
- // a diagnotic if that error code is not SPV_FAILED_MATCH.
+ // a diagnostic if that error code is not SPV_FAILED_MATCH.
spv_result_t binaryEncodeNumericLiteral(const char* numeric_literal,
spv_result_t error_code,
const IdType& type,