Memory semantics Relaxed is a synonym for None
The disassembler should prefer to print Relaxed, I think. (Untested.)
This commit is contained in:
Родитель
212bafe4da
Коммит
bfa3d86f7b
|
@ -1046,6 +1046,14 @@ static const spv_operand_desc_t functionControlEntries[] = {
|
|||
};
|
||||
|
||||
static const spv_operand_desc_t memorySemanticsEntries[] = {
|
||||
// "Relaxed" should be a synonym for "None".
|
||||
// Put the Relaxed entry first so that the disassembler
|
||||
// will prefer to emit "Relaxed".
|
||||
{"Relaxed",
|
||||
MemorySemanticsMaskNone,
|
||||
SPV_OPCODE_FLAGS_NONE,
|
||||
0,
|
||||
{SPV_OPERAND_TYPE_NONE}},
|
||||
{"None",
|
||||
MemorySemanticsMaskNone,
|
||||
SPV_OPCODE_FLAGS_NONE,
|
||||
|
|
|
@ -58,6 +58,8 @@ INSTANTIATE_TEST_CASE_P(
|
|||
TextToBinaryMemorySemanticsTest, MemorySemanticsTest,
|
||||
::testing::ValuesIn(std::vector<EnumCase<spv::MemorySemanticsMask>>{
|
||||
{spv::MemorySemanticsMaskNone, "None", {}},
|
||||
// Relaxed is a synonym for None.
|
||||
{spv::MemorySemanticsMaskNone, "Relaxed", {}},
|
||||
CASE(Acquire),
|
||||
CASE(Release),
|
||||
CASE(SequentiallyConsistent),
|
||||
|
|
Загрузка…
Ссылка в новой задаче