From e47e4bfae54b79ced65d89dda936f810c55b13b2 Mon Sep 17 00:00:00 2001 From: Dave Thaler Date: Thu, 25 Jan 2024 14:28:39 -0800 Subject: [PATCH] Resolve merge conflicts Signed-off-by: Dave Thaler --- src/asm_marshal.cpp | 2 +- src/asm_unmarshal.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/asm_marshal.cpp b/src/asm_marshal.cpp index 76e290e0d..ae4438171 100644 --- a/src/asm_marshal.cpp +++ b/src/asm_marshal.cpp @@ -258,7 +258,7 @@ struct MarshalVisitor { vector operator()(Atomic const& b) { return {ebpf_inst{ - .opcode = static_cast(INST_CLS_ST | 0x1 | INST_MODE_ATOMIC | width_to_opcode(b.access.width)), + .opcode = static_cast(INST_CLS_STX | INST_MODE_ATOMIC | width_to_opcode(b.access.width)), .dst = b.access.basereg.v, .src = b.valreg.v, .offset = static_cast(b.access.offset), diff --git a/src/asm_unmarshal.cpp b/src/asm_unmarshal.cpp index 60d1864cd..22fca1cd7 100644 --- a/src/asm_unmarshal.cpp +++ b/src/asm_unmarshal.cpp @@ -287,8 +287,6 @@ struct Unmarshaller { ((inst.opcode & INST_SIZE_MASK) != INST_SIZE_W && (inst.opcode & INST_SIZE_MASK) != INST_SIZE_DW)) throw InvalidInstruction(pc, inst.opcode); - if (inst.imm != 0) - throw InvalidInstruction(pc, "Unsupported atomic instruction"); return Atomic{ .op = getAtomicOp(pc, inst), .access =