#include "source/opcode.h"
#include <assert.h>
#include <string.h>
#include <algorithm>
#include <cstdlib>
#include "source/instruction.h"
#include "source/macro.h"
#include "source/spirv_constant.h"
#include "source/spirv_endian.h"
#include "source/spirv_target_env.h"
#include "spirv-tools/libspirv.h"
namespace {
struct OpcodeDescPtrLen { … };
#include "core.insts-unified1.inc"
static const spv_opcode_table_t kOpcodeTable = …;
struct VendorTool { … };
const VendorTool vendor_tools[] = …;
}
const char* spvGeneratorStr(uint32_t generator) { … }
uint32_t spvOpcodeMake(uint16_t wordCount, spv::Op opcode) { … }
void spvOpcodeSplit(const uint32_t word, uint16_t* pWordCount,
uint16_t* pOpcode) { … }
spv_result_t spvOpcodeTableGet(spv_opcode_table* pInstTable, spv_target_env) { … }
spv_result_t spvOpcodeTableNameLookup(spv_target_env env,
const spv_opcode_table table,
const char* name,
spv_opcode_desc* pEntry) { … }
spv_result_t spvOpcodeTableValueLookup(spv_target_env env,
const spv_opcode_table table,
const spv::Op opcode,
spv_opcode_desc* pEntry) { … }
void spvInstructionCopy(const uint32_t* words, const spv::Op opcode,
const uint16_t wordCount, const spv_endianness_t endian,
spv_instruction_t* pInst) { … }
const char* spvOpcodeString(const uint32_t opcode) { … }
const char* spvOpcodeString(const spv::Op opcode) { … }
int32_t spvOpcodeIsScalarType(const spv::Op opcode) { … }
int32_t spvOpcodeIsSpecConstant(const spv::Op opcode) { … }
int32_t spvOpcodeIsConstant(const spv::Op opcode) { … }
bool spvOpcodeIsConstantOrUndef(const spv::Op opcode) { … }
bool spvOpcodeIsScalarSpecConstant(const spv::Op opcode) { … }
int32_t spvOpcodeIsComposite(const spv::Op opcode) { … }
bool spvOpcodeReturnsLogicalVariablePointer(const spv::Op opcode) { … }
int32_t spvOpcodeReturnsLogicalPointer(const spv::Op opcode) { … }
int32_t spvOpcodeGeneratesType(spv::Op op) { … }
bool spvOpcodeIsDecoration(const spv::Op opcode) { … }
bool spvOpcodeIsLoad(const spv::Op opcode) { … }
bool spvOpcodeIsBranch(spv::Op opcode) { … }
bool spvOpcodeIsAtomicWithLoad(const spv::Op opcode) { … }
bool spvOpcodeIsAtomicOp(const spv::Op opcode) { … }
bool spvOpcodeIsReturn(spv::Op opcode) { … }
bool spvOpcodeIsAbort(spv::Op opcode) { … }
bool spvOpcodeIsReturnOrAbort(spv::Op opcode) { … }
bool spvOpcodeIsBlockTerminator(spv::Op opcode) { … }
bool spvOpcodeIsBaseOpaqueType(spv::Op opcode) { … }
bool spvOpcodeIsNonUniformGroupOperation(spv::Op opcode) { … }
bool spvOpcodeIsScalarizable(spv::Op opcode) { … }
bool spvOpcodeIsDebug(spv::Op opcode) { … }
bool spvOpcodeIsCommutativeBinaryOperator(spv::Op opcode) { … }
bool spvOpcodeIsLinearAlgebra(spv::Op opcode) { … }
bool spvOpcodeIsImageSample(const spv::Op opcode) { … }
bool spvIsExtendedInstruction(const spv::Op opcode) { … }
std::vector<uint32_t> spvOpcodeMemorySemanticsOperandIndices(spv::Op opcode) { … }
bool spvOpcodeIsAccessChain(spv::Op opcode) { … }
bool spvOpcodeIsBit(spv::Op opcode) { … }
bool spvOpcodeGeneratesUntypedPointer(spv::Op opcode) { … }