Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: src/arm/assembler-arm-inl.h

Issue 11428137: ARM: Make use of d16-d31 when available. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address more comments Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/arm/assembler-arm-inl.h
diff --git a/src/arm/assembler-arm-inl.h b/src/arm/assembler-arm-inl.h
index acd61feff89711daf952ae3714efc7c88a030545..12bf386695684ba58efa15b7d0daf10be4817d6d 100644
--- a/src/arm/assembler-arm-inl.h
+++ b/src/arm/assembler-arm-inl.h
@@ -50,10 +50,62 @@ namespace internal {
int DwVfpRegister::ToAllocationIndex(DwVfpRegister reg) {
ASSERT(!reg.is(kDoubleRegZero));
ASSERT(!reg.is(kScratchDoubleReg));
+ if (reg.code() > kDoubleRegZero.code())
+ return reg.code() - kNumReservedRegisters;
return reg.code();
}
+DwVfpRegister DwVfpRegister::FromAllocationIndex(int index) {
+ ASSERT(index >= 0 && index < NumAllocatableRegisters());
+ if (index >= kDoubleRegZero.code())
Rodolph Perfetta 2012/12/17 14:38:30 Do we need to assert kScratchDoubleReg.code() - kD
hans 2012/12/17 15:32:46 Good idea! Done.
+ return from_code(index + kNumReservedRegisters);
+ return from_code(index);
+}
+
+
+const char* DwVfpRegister::AllocationIndexToString(int index) {
+ ASSERT(index >= 0 && index < NumAllocatableRegisters());
+ if (index >= kDoubleRegZero.code())
+ index += kNumReservedRegisters;
+ const char* const names[] = {
+ "d0",
+ "d1",
+ "d2",
+ "d3",
+ "d4",
+ "d5",
+ "d6",
+ "d7",
+ "d8",
+ "d9",
+ "d10",
+ "d11",
+ "d12",
+ "d13",
+ "d14",
+ "d15",
+ "d16",
+ "d17",
+ "d18",
+ "d19",
+ "d20",
+ "d21",
+ "d22",
+ "d23",
+ "d24",
+ "d25",
+ "d26",
+ "d27",
+ "d28",
+ "d29",
+ "d30",
+ "d31"
+ };
+ return names[index];
+}
+
+
void RelocInfo::apply(intptr_t delta) {
if (RelocInfo::IsInternalReference(rmode_)) {
// absolute code pointer inside code object moves with the code object.
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/code-stubs-arm.h » ('j') | src/platform-linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698