summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/CompilerIR.h5
-rw-r--r--src/compiler/Frontend.cc2
-rw-r--r--src/compiler/codegen/RallocUtil.cc4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/CompilerIR.h b/src/compiler/CompilerIR.h
index 14af69d3d6..8dcf56bdd4 100644
--- a/src/compiler/CompilerIR.h
+++ b/src/compiler/CompilerIR.h
@@ -47,6 +47,7 @@ typedef struct RegLocation {
} RegLocation;
#define INVALID_SREG (-1)
+#define INVALID_VREG (0xFFFFU)
#define INVALID_REG (0x3F)
#define INVALID_OFFSET (-1)
@@ -201,8 +202,8 @@ typedef struct CompilationUnit {
int assemblerRetries;
std::vector<short> codeBuffer;
std::vector<uint32_t> mappingTable;
- std::vector<uint32_t> coreVmapTable;
- std::vector<short> fpVmapTable;
+ std::vector<uint16_t> coreVmapTable;
+ std::vector<uint16_t> fpVmapTable;
bool printMe;
bool hasClassLiterals; // Contains class ptrs used as literals
bool hasLoop; // Contains a loop
diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc
index ebbd72f79c..be3a6052e0 100644
--- a/src/compiler/Frontend.cc
+++ b/src/compiler/Frontend.cc
@@ -907,7 +907,7 @@ bool oatCompileMethod(const Compiler& compiler, Method* method, art::Instruction
reinterpret_cast<const int32_t*>(&cUnit.mappingTable[0]),
mapping_table->GetLength() * sizeof(cUnit.mappingTable[0]));
// Add a marker to take place of lr
- cUnit.coreVmapTable.push_back(-1);
+ cUnit.coreVmapTable.push_back(INVALID_VREG);
// Combine vmap tables - core regs, then fp regs
for (uint32_t i = 0; i < cUnit.fpVmapTable.size(); i++) {
cUnit.coreVmapTable.push_back(cUnit.fpVmapTable[i]);
diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc
index 969028779c..9d3717a279 100644
--- a/src/compiler/codegen/RallocUtil.cc
+++ b/src/compiler/codegen/RallocUtil.cc
@@ -241,7 +241,7 @@ extern int oatAllocPreservedCoreReg(CompilationUnit* cUnit, int sReg)
* Mark a callee-save fp register as promoted. Note that
* vpush/vpop uses contiguous register lists so we must
* include any holes in the mask. Associate holes with
- * Dalvik register INVALID_REG (-1).
+ * Dalvik register INVALID_VREG (0xFFFFU).
*/
STATIC void markPreservedSingle(CompilationUnit* cUnit, int sReg, int reg)
{
@@ -250,7 +250,7 @@ STATIC void markPreservedSingle(CompilationUnit* cUnit, int sReg, int reg)
// Ensure fpVmapTable is large enough
int tableSize = cUnit->fpVmapTable.size();
for (int i = tableSize; i < (reg + 1); i++) {
- cUnit->fpVmapTable.push_back(INVALID_REG);
+ cUnit->fpVmapTable.push_back(INVALID_VREG);
}
// Add the current mapping
cUnit->fpVmapTable[reg] = sReg;