Index: src/arm/constants-arm.cc |
=================================================================== |
--- src/arm/constants-arm.cc (revision 3208) |
+++ src/arm/constants-arm.cc (working copy) |
@@ -66,7 +66,29 @@ |
return result; |
} |
+// Support for VFP registers s0 to s31 (d0 to d15). |
+// Note that "sN:sM" is the same as "dN/2" |
+// These register names are defined in a way to match the native disassembler |
+// formatting. See for example the command "objdump -d <binary file>". |
+const char* VFPRegisters::names_[kNumVFPRegisters] = { |
+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", |
+ "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", |
+ "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", |
+ "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31", |
+ "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", |
+ "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15", |
+}; |
+const char* VFPRegisters::Name(int reg) { |
+ const char* result; |
+ if ((0 <= reg) && (reg < kNumVFPRegisters)) { |
+ result = names_[reg]; |
+ } else { |
+ result = "no_vfp_reg"; |
+ } |
+ return result; |
+} |
+ |
int Registers::Number(const char* name) { |
// Look through the canonical names. |
for (int i = 0; i < kNumRegisters; i++) { |