diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-12-14 01:00:56 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-12-14 01:00:56 +0000 |
commit | bc1321735c15104ffad195e1509cab5f3a044260 (patch) | |
tree | 8b2a54226e10e8a564a2287cd8e65b577e0fd6c2 /includes/compiler/PCode.h | |
parent | 25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22 (diff) | |
download | MWCC-bc1321735c15104ffad195e1509cab5f3a044260.tar.gz MWCC-bc1321735c15104ffad195e1509cab5f3a044260.zip |
rename some stuff and use an enum for RegClass
Diffstat (limited to 'includes/compiler/PCode.h')
-rw-r--r-- | includes/compiler/PCode.h | 14 |
1 files changed, 7 insertions, 7 deletions
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)) |