From ee4eecc7414f82fe55f5ae5743487fdca895111e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 26 Jan 2022 12:26:12 +0900 Subject: [PATCH] [gamecode] Correct types and opname for memset and move --- libs/gamecode/opcodes.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/libs/gamecode/opcodes.py b/libs/gamecode/opcodes.py index d6cb80f6f..d8b9ed711 100644 --- a/libs/gamecode/opcodes.py +++ b/libs/gamecode/opcodes.py @@ -254,10 +254,10 @@ mathops_formats = { memset_formats = { "opcode": "OP_MEMSET_{op_memset[oo].upper()}", "mnemonic": "memset.{op_memset[oo]}", - "opname": "memset", + "opname": "memset{op_memset[oo]}", "format": "{memset_fmt[oo]}", "widths": "{memset_widths[oo]}", - "types": "ev_int, ev_void, ev_void", + "types": "{memset_types[oo]}", "args": { "op_memset": ["i", "p", "pi", None], "memset_fmt": ["%Ga, %sb, %gc", "%Ga, %Gb, %Gc", "%Ga, %sb, %Gc", None], @@ -267,17 +267,23 @@ memset_formats = { "1, 0, 1", None, ], + "memset_types": [ + "ev_void, ev_short, ev_void", + "ev_ptr, ev_int, ev_ptr", + "ev_ptr, ev_short, ev_ptr", + ], }, } move_formats = { "opcode": "OP_MOVE_{op_move[oo].upper()}", - "mnemonic": "memset.{op_move[oo]}", - "opname": "memset", + "mnemonic": "move.{op_move[oo]}", + "opname": "move{suff_move[oo]}", "format": "{move_fmt[oo]}", "widths": "{move_widths[oo]}", - "types": "ev_int, ev_void, ev_void", + "types": "{move_types[oo]}", "args": { "op_move": ["i", "p", "pi", None], + "suff_move": ["", "p", "p", None], "move_fmt": ["%Ga, %sb, %gc", "%Ga, %Gb, %Gc", "%Ga, %sb, %Gc", None], "move_widths": [ "-1, 0, -1", @@ -285,6 +291,11 @@ move_formats = { "1, 0, 1", None, ], + "move_types": [ + "ev_void, ev_short, ev_void", + "ev_ptr, ev_int, ev_ptr", + "ev_ptr, ev_short, ev_ptr", + ], }, } noop_formats = {