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

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 23645003: Esoteric bit operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 } 1672 }
1673 1673
1674 1674
1675 void Assembler::notl(Register reg) { 1675 void Assembler::notl(Register reg) {
1676 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1676 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1677 EmitUint8(0xF7); 1677 EmitUint8(0xF7);
1678 EmitUint8(0xD0 | reg); 1678 EmitUint8(0xD0 | reg);
1679 } 1679 }
1680 1680
1681 1681
1682 void Assembler::bsrl(Register dst, Register src) {
1683 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1684 EmitUint8(0x0F);
1685 EmitUint8(0xBD);
1686 EmitRegisterOperand(dst, src);
1687 }
1688
1689
1682 void Assembler::enter(const Immediate& imm) { 1690 void Assembler::enter(const Immediate& imm) {
1683 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1691 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1684 EmitUint8(0xC8); 1692 EmitUint8(0xC8);
1685 ASSERT(imm.is_uint16()); 1693 ASSERT(imm.is_uint16());
1686 EmitUint8(imm.value() & 0xFF); 1694 EmitUint8(imm.value() & 0xFF);
1687 EmitUint8((imm.value() >> 8) & 0xFF); 1695 EmitUint8((imm.value() >> 8) & 0xFF);
1688 EmitUint8(0x00); 1696 EmitUint8(0x00);
1689 } 1697 }
1690 1698
1691 1699
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 2496
2489 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2497 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2490 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2498 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2491 return xmm_reg_names[reg]; 2499 return xmm_reg_names[reg];
2492 } 2500 }
2493 2501
2494 2502
2495 } // namespace dart 2503 } // namespace dart
2496 2504
2497 #endif // defined TARGET_ARCH_IA32 2505 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698