From 6fe72b0420d2b45a2119c21e919c134db6b9d94f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 2 Feb 2022 19:14:22 +0900 Subject: [PATCH] [qfcc] Check load/store operand type before mangling This fixes the incorrect use of assign64 for quaternions. All tests except return-postop pass \o/. --- tools/qfcc/source/opcodes.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/opcodes.c b/tools/qfcc/source/opcodes.c index 4be436c1b..5c97f780c 100644 --- a/tools/qfcc/source/opcodes.c +++ b/tools/qfcc/source/opcodes.c @@ -315,8 +315,11 @@ rua_opcode_find (const char *name, operand_t *op_a, operand_t *op_b, // lot of instructions, but this mapping scheme leaves a lot to be desired. const char *opname_a = ""; const char *opname_c = ""; - if (!strcmp (name, "load") || !strcmp (name, "store") - || !strcmp (name, "assign")) { + etype_t type; + if ((!strcmp (name, "load") || !strcmp (name, "store") + || !strcmp (name, "assign")) + && ((type = low_level_type (op_c->type)) == ev_long + || type == ev_ulong || type == ev_double)) { opname_c = name; if (!strcmp (name, "assign")) { opname_a = name;