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/intermediate_language.h" | 7 #include "vm/intermediate_language.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 if (out().kind() == Location::kRegister) { | 50 if (out().kind() == Location::kRegister) { |
51 // Fixed output registers are allowed to overlap with | 51 // Fixed output registers are allowed to overlap with |
52 // temps and inputs. | 52 // temps and inputs. |
53 blocked_registers[out().reg()] = true; | 53 blocked_registers[out().reg()] = true; |
54 } | 54 } |
55 | 55 |
56 // Do not allocate known registers. | 56 // Do not allocate known registers. |
57 blocked_registers[CTX] = true; | 57 blocked_registers[CTX] = true; |
| 58 blocked_registers[SPREG] = true; |
| 59 blocked_registers[FPREG] = true; |
58 if (TMP != kNoRegister) { | 60 if (TMP != kNoRegister) { |
59 blocked_registers[TMP] = true; | 61 blocked_registers[TMP] = true; |
60 } | 62 } |
61 | 63 |
62 // Allocate all unallocated input locations. | 64 // Allocate all unallocated input locations. |
63 for (intptr_t i = 0; i < input_count(); i++) { | 65 for (intptr_t i = 0; i < input_count(); i++) { |
64 Location loc = in(i); | 66 Location loc = in(i); |
65 if (loc.kind() == Location::kUnallocated) { | 67 if (loc.kind() == Location::kUnallocated) { |
66 ASSERT(loc.policy() == Location::kRequiresRegister); | 68 ASSERT(loc.policy() == Location::kRequiresRegister); |
67 set_in(i, Location::RegisterLocation( | 69 set_in(i, Location::RegisterLocation( |
(...skipping 22 matching lines...) Expand all Loading... |
90 result_location = in(0); | 92 result_location = in(0); |
91 break; | 93 break; |
92 } | 94 } |
93 set_out(result_location); | 95 set_out(result_location); |
94 } | 96 } |
95 } | 97 } |
96 | 98 |
97 | 99 |
98 } // namespace dart | 100 } // namespace dart |
99 | 101 |
OLD | NEW |