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

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

Issue 1990133002: X87: Add cmpxchg and lock instructions to x64 and ia32 {dis,}assemblers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « src/x87/assembler-x87.h ('k') | src/x87/disasm-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 emit_operand(reg, op); 594 emit_operand(reg, op);
595 } 595 }
596 596
597 void Assembler::xchg_w(Register reg, const Operand& op) { 597 void Assembler::xchg_w(Register reg, const Operand& op) {
598 EnsureSpace ensure_space(this); 598 EnsureSpace ensure_space(this);
599 EMIT(0x66); 599 EMIT(0x66);
600 EMIT(0x87); 600 EMIT(0x87);
601 emit_operand(reg, op); 601 emit_operand(reg, op);
602 } 602 }
603 603
604 void Assembler::lock() {
605 EnsureSpace ensure_space(this);
606 EMIT(0xF0);
607 }
608
609 void Assembler::cmpxchg(const Operand& dst, Register src) {
610 EnsureSpace ensure_space(this);
611 EMIT(0x0F);
612 EMIT(0xB1);
613 emit_operand(src, dst);
614 }
615
616 void Assembler::cmpxchg_b(const Operand& dst, Register src) {
617 EnsureSpace ensure_space(this);
618 EMIT(0x0F);
619 EMIT(0xB0);
620 emit_operand(src, dst);
621 }
622
623 void Assembler::cmpxchg_w(const Operand& dst, Register src) {
624 EnsureSpace ensure_space(this);
625 EMIT(0x66);
626 EMIT(0x0F);
627 EMIT(0xB1);
628 emit_operand(src, dst);
629 }
630
604 void Assembler::adc(Register dst, int32_t imm32) { 631 void Assembler::adc(Register dst, int32_t imm32) {
605 EnsureSpace ensure_space(this); 632 EnsureSpace ensure_space(this);
606 emit_arith(2, Operand(dst), Immediate(imm32)); 633 emit_arith(2, Operand(dst), Immediate(imm32));
607 } 634 }
608 635
609 636
610 void Assembler::adc(Register dst, const Operand& src) { 637 void Assembler::adc(Register dst, const Operand& src) {
611 EnsureSpace ensure_space(this); 638 EnsureSpace ensure_space(this);
612 EMIT(0x13); 639 EMIT(0x13);
613 emit_operand(dst, src); 640 emit_operand(dst, src);
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 fflush(coverage_log); 2247 fflush(coverage_log);
2221 } 2248 }
2222 } 2249 }
2223 2250
2224 #endif 2251 #endif
2225 2252
2226 } // namespace internal 2253 } // namespace internal
2227 } // namespace v8 2254 } // namespace v8
2228 2255
2229 #endif // V8_TARGET_ARCH_X87 2256 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/assembler-x87.h ('k') | src/x87/disasm-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698