summaryrefslogtreecommitdiff
path: root/includes/compiler/PCode.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-12-14 01:00:56 +0000
committerAsh Wolf <ninji@wuffs.org>2022-12-14 01:00:56 +0000
commitbc1321735c15104ffad195e1509cab5f3a044260 (patch)
tree8b2a54226e10e8a564a2287cd8e65b577e0fd6c2 /includes/compiler/PCode.h
parent25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22 (diff)
downloadMWCC-bc1321735c15104ffad195e1509cab5f3a044260.tar.gz
MWCC-bc1321735c15104ffad195e1509cab5f3a044260.zip
rename some stuff and use an enum for RegClass
Diffstat (limited to '')
-rw-r--r--includes/compiler/PCode.h14
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))