OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/locations.h" | 5 #include "vm/locations.h" |
6 | 6 |
7 #include "vm/il_printer.h" | 7 #include "vm/il_printer.h" |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 #include "vm/flow_graph_compiler.h" | 9 #include "vm/flow_graph_compiler.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 summary->set_out(out); | 43 summary->set_out(out); |
44 return summary; | 44 return summary; |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 const char* Location::Name() const { | 48 const char* Location::Name() const { |
49 switch (kind()) { | 49 switch (kind()) { |
50 case kInvalid: return "?"; | 50 case kInvalid: return "?"; |
51 case kRegister: return Assembler::RegisterName(reg()); | 51 case kRegister: return Assembler::RegisterName(reg()); |
| 52 case kXmmRegister: return Assembler::XmmRegisterName(xmm_reg()); |
52 case kStackSlot: return "S"; | 53 case kStackSlot: return "S"; |
53 case kUnallocated: | 54 case kUnallocated: |
54 switch (policy()) { | 55 switch (policy()) { |
55 case kAny: | 56 case kAny: |
56 return "A"; | 57 return "A"; |
57 case kPrefersRegister: | 58 case kPrefersRegister: |
58 return "P"; | 59 return "P"; |
59 case kRequiresRegister: | 60 case kRequiresRegister: |
60 return "R"; | 61 return "R"; |
| 62 case kRequiresXmmRegister: |
| 63 return "D"; |
61 case kSameAsFirstInput: | 64 case kSameAsFirstInput: |
62 return "0"; | 65 return "0"; |
63 } | 66 } |
64 UNREACHABLE(); | 67 UNREACHABLE(); |
65 default: | 68 default: |
66 ASSERT(IsConstant()); | 69 ASSERT(IsConstant()); |
67 return "C"; | 70 return "C"; |
68 } | 71 } |
69 return "?"; | 72 return "?"; |
70 } | 73 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 112 |
110 if (!out().IsInvalid()) { | 113 if (!out().IsInvalid()) { |
111 f->Print(" => "); | 114 f->Print(" => "); |
112 out().PrintTo(f); | 115 out().PrintTo(f); |
113 } | 116 } |
114 | 117 |
115 if (always_calls()) f->Print(" C"); | 118 if (always_calls()) f->Print(" C"); |
116 } | 119 } |
117 | 120 |
118 } // namespace dart | 121 } // namespace dart |
OLD | NEW |