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 /compiler_and_linker/unsorted/LoopOptimization.c | |
parent | 25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22 (diff) | |
download | MWCC-bc1321735c15104ffad195e1509cab5f3a044260.tar.gz MWCC-bc1321735c15104ffad195e1509cab5f3a044260.zip |
rename some stuff and use an enum for RegClass
Diffstat (limited to 'compiler_and_linker/unsorted/LoopOptimization.c')
-rw-r--r-- | compiler_and_linker/unsorted/LoopOptimization.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler_and_linker/unsorted/LoopOptimization.c b/compiler_and_linker/unsorted/LoopOptimization.c index 6472119..327d7e4 100644 --- a/compiler_and_linker/unsorted/LoopOptimization.c +++ b/compiler_and_linker/unsorted/LoopOptimization.c @@ -5,6 +5,7 @@ #include "compiler/CompilerTools.h" #include "compiler/LoopDetection.h" #include "compiler/PCode.h" +#include "compiler/Registers.h" #include "compiler/UseDefChains.h" #include "compiler/objects.h" #include "compiler/types.h" @@ -1309,7 +1310,7 @@ void changearraytoregisters(void) { while (i--) { if ( op->kind == PCOp_MEMORY && - (unsigned char) op->arg == 1 && + (PCOpMemoryArg) op->arg == PCOpMemory1 && (array = lookup_array_object(arrays, op->data.mem.obj)) && !array->invalid ) { @@ -1475,7 +1476,7 @@ void changearraytoregisters(void) { instr->argCount && (instr->flags & (fPCodeFlag2 | fPCodeFlag4)) && instr->args[2].kind == PCOp_MEMORY && - (unsigned char) instr->args[2].arg == 1 && + (PCOpMemoryArg) instr->args[2].arg == PCOpMemory1 && (array = lookup_array_object(arrays, instr->args[2].data.mem.obj)) && !(array->invalid) ) |