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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 155279: X64: Fix bug in left-shift. (Closed)
Patch Set: Created 11 years, 5 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 572
573 void Assembler::shift_32(Register dst, int subcode) { 573 void Assembler::shift_32(Register dst, int subcode) {
574 EnsureSpace ensure_space(this); 574 EnsureSpace ensure_space(this);
575 last_pc_ = pc_; 575 last_pc_ = pc_;
576 emit_optional_rex_32(dst); 576 emit_optional_rex_32(dst);
577 emit(0xD3); 577 emit(0xD3);
578 emit_modrm(subcode, dst); 578 emit_modrm(subcode, dst);
579 } 579 }
580 580
581 581
582 void Assembler::shift_32(Register dst, Immediate shift_amount, int subcode) {
583 EnsureSpace ensure_space(this);
584 last_pc_ = pc_;
585 ASSERT(is_uint6(shift_amount.value_)); // illegal shift count
586 if (shift_amount.value_ == 1) {
587 emit_optional_rex_32(dst);
588 emit(0xD1);
589 emit_modrm(subcode, dst);
590 } else {
591 emit_optional_rex_32(dst);
592 emit(0xC1);
593 emit_modrm(subcode, dst);
594 emit(shift_amount.value_);
595 }
596 }
597
598
582 void Assembler::bt(const Operand& dst, Register src) { 599 void Assembler::bt(const Operand& dst, Register src) {
583 EnsureSpace ensure_space(this); 600 EnsureSpace ensure_space(this);
584 last_pc_ = pc_; 601 last_pc_ = pc_;
585 emit_rex_64(src, dst); 602 emit_rex_64(src, dst);
586 emit(0x0F); 603 emit(0x0F);
587 emit(0xA3); 604 emit(0xA3);
588 emit_operand(src, dst); 605 emit_operand(src, dst);
589 } 606 }
590 607
591 608
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 bool BreakLocationIterator::IsDebugBreakAtReturn() { 2193 bool BreakLocationIterator::IsDebugBreakAtReturn() {
2177 UNIMPLEMENTED(); 2194 UNIMPLEMENTED();
2178 return false; 2195 return false;
2179 } 2196 }
2180 2197
2181 void BreakLocationIterator::SetDebugBreakAtReturn() { 2198 void BreakLocationIterator::SetDebugBreakAtReturn() {
2182 UNIMPLEMENTED(); 2199 UNIMPLEMENTED();
2183 } 2200 }
2184 2201
2185 } } // namespace v8::internal 2202 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/codegen-x64.cc » ('j') | test/mjsunit/apply.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698