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

Unified Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 2623633003: [Atomics] Make Atomics.exchange a builtin using TF (Closed)
Patch Set: remove headers Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/ia32/code-generator-ia32.cc
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc
index 369699067e2b8b9d8dc65ad5e9b322be0dfc9ff3..0f6d1c3a4a8ff7db2ed2a07436e3a96e542bbe16 100644
--- a/src/compiler/ia32/code-generator-ia32.cc
+++ b/src/compiler/ia32/code-generator-ia32.cc
@@ -1888,24 +1888,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
break;
}
- case kIA32Xchgb: {
- size_t index = 0;
- Operand operand = i.MemoryOperand(&index);
- __ xchg_b(i.InputRegister(index), operand);
- break;
- }
- case kIA32Xchgw: {
- size_t index = 0;
- Operand operand = i.MemoryOperand(&index);
- __ xchg_w(i.InputRegister(index), operand);
- break;
- }
- case kIA32Xchgl: {
- size_t index = 0;
- Operand operand = i.MemoryOperand(&index);
- __ xchg(i.InputRegister(index), operand);
- break;
- }
case kCheckedLoadInt8:
ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b);
break;
@@ -1952,6 +1934,30 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kCheckedStoreWord64:
UNREACHABLE(); // currently unsupported checked int64 load/store.
break;
+ case kAtomicExchangeInt8: {
+ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1));
+ __ movsx_b(i.InputRegister(0), i.InputRegister(0));
+ break;
+ }
+ case kAtomicExchangeUint8: {
+ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1));
+ __ movzx_b(i.InputRegister(0), i.InputRegister(0));
+ break;
+ }
+ case kAtomicExchangeInt16: {
+ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1));
+ __ movsx_w(i.InputRegister(0), i.InputRegister(0));
+ break;
+ }
+ case kAtomicExchangeUint16: {
+ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1));
+ __ movzx_w(i.InputRegister(0), i.InputRegister(0));
+ break;
+ }
+ case kAtomicExchangeWord32: {
+ __ xchg(i.InputRegister(0), i.MemoryOperand(1));
+ break;
+ }
case kAtomicLoadInt8:
case kAtomicLoadUint8:
case kAtomicLoadInt16:

Powered by Google App Engine
This is Rietveld 408576698