summaryrefslogtreecommitdiff
path: root/disasm.cpp
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-05-01 13:49:46 +0300
committerOxore <oxore@protonmail.com>2023-05-01 14:14:05 +0300
commitf279e467e38281cfdee60b197588109abd08e83d (patch)
treefdd6f4b188764712322fed692b0c2986b721d50f /disasm.cpp
parent1429da758d47cef110e86824380f77d7d5aa02ff (diff)
Impl TRAP
Diffstat (limited to 'disasm.cpp')
-rw-r--r--disasm.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/disasm.cpp b/disasm.cpp
index 01a4af5..7026b63 100644
--- a/disasm.cpp
+++ b/disasm.cpp
@@ -656,10 +656,12 @@ static void disasm_move_to(
}
static void disasm_trap(
- DisasmNode& node, uint16_t instr, const DataBuffer &code, const Settings &s)
+ DisasmNode& node, uint16_t instr, const DataBuffer &, const Settings &)
{
- // TODO
- return disasm_verbatim(node, instr, code, s);
+ const unsigned vector = instr & 0xf;
+ snprintf(node.mnemonic, kMnemonicBufferSize, "trap");
+ snprintf(node.arguments, kArgsBufferSize, "#%u", vector);
+ node.size = kInstructionSizeStepBytes;
}
static void disasm_link_unlink(