From bc1321735c15104ffad195e1509cab5f3a044260 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 14 Dec 2022 01:00:56 +0000 Subject: rename some stuff and use an enum for RegClass --- includes/compiler/PCode.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'includes/compiler/PCode.h') diff --git a/includes/compiler/PCode.h b/includes/compiler/PCode.h index cebab6f..f1f786c 100644 --- a/includes/compiler/PCode.h +++ b/includes/compiler/PCode.h @@ -51,7 +51,7 @@ typedef enum { struct PCodeArg { PCOpKind kind; - unsigned char arg; + RegClass arg; union { struct { unsigned short effect; @@ -79,33 +79,33 @@ struct PCodeArg { #define PC_OP_IS_REGISTER(_op, _rclass, _reg) \ ((_op)->kind == PCOp_REGISTER && \ - (char) (_op)->arg == (_rclass) && \ + (_op)->arg == (_rclass) && \ (_op)->data.reg.reg == (_reg)) #define PC_OP_IS_READ_REGISTER(_op, _rclass, _reg) \ ((_op)->kind == PCOp_REGISTER && \ - (char) (_op)->arg == (_rclass) && \ + (_op)->arg == (_rclass) && \ (_op)->data.reg.reg == (_reg) && \ ((_op)->data.reg.effect & EffectRead)) #define PC_OP_IS_WRITE_REGISTER(_op, _rclass, _reg) \ ((_op)->kind == PCOp_REGISTER && \ - (char) (_op)->arg == (_rclass) && \ + (_op)->arg == (_rclass) && \ (_op)->data.reg.reg == (_reg) && \ ((_op)->data.reg.effect & EffectWrite)) #define PC_OP_IS_ANY_REGISTER(_op, _rclass) \ ((_op)->kind == PCOp_REGISTER && \ - (char) (_op)->arg == (_rclass)) + (_op)->arg == (_rclass)) #define PC_OP_IS_READ_ANY_REGISTER(_op, _rclass) \ ((_op)->kind == PCOp_REGISTER && \ - (char) (_op)->arg == (_rclass) && \ + (_op)->arg == (_rclass) && \ ((_op)->data.reg.effect & EffectRead)) #define PC_OP_IS_WRITE_ANY_REGISTER(_op, _rclass) \ ((_op)->kind == PCOp_REGISTER && \ - (char) (_op)->arg == (_rclass) && \ + (_op)->arg == (_rclass) && \ ((_op)->data.reg.effect & EffectWrite)) -- cgit v1.2.3