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

Side by Side Diff: src/x64/register-allocator-x64.cc

Issue 149002: X64: Count operations (increment, decrement) (Closed)
Patch Set: Created 11 years, 6 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } else if (is_register() && reg().is(target)) { 64 } else if (is_register() && reg().is(target)) {
65 ASSERT(CodeGeneratorScope::Current()->has_valid_frame()); 65 ASSERT(CodeGeneratorScope::Current()->has_valid_frame());
66 CodeGeneratorScope::Current()->frame()->Spill(target); 66 CodeGeneratorScope::Current()->frame()->Spill(target);
67 ASSERT(CodeGeneratorScope::Current()->allocator()->count(target) == 1); 67 ASSERT(CodeGeneratorScope::Current()->allocator()->count(target) == 1);
68 } 68 }
69 ASSERT(is_register()); 69 ASSERT(is_register());
70 ASSERT(reg().is(target)); 70 ASSERT(reg().is(target));
71 } 71 }
72 72
73 73
74 // -------------------------------------------------------------------------
75 // RegisterAllocator implementation.
76
77 Result RegisterAllocator::AllocateByteRegisterWithoutSpilling() {
78 // X64 has no distinction between registers that can be used as 8-bit
79 // and registers that can't. However, if the register is not one of
80 // AL, CL, DL or BL, the REX.W bit is necessary to trigger 64-bit
William Hesse 2009/06/25 10:46:05 We really don't even need this function anymore.
81 // interpretation of 8-bit registers (using SPL, BPL, DIL and SIL
82 // instead of AH, CH, DH and BH).
83 return AllocateWithoutSpilling();
84 }
85
86
74 } } // namespace v8::internal 87 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698