Changeset 215565 in webkit for trunk/Source/JavaScriptCore/assembler
- Timestamp:
- Apr 20, 2017, 10:55:44 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore/assembler
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
r215196 r215565 118 118 struct BaseIndex; 119 119 120 static RegisterID withSwappedRegister(RegisterID original, RegisterID left, RegisterID right) 121 { 122 if (original == left) 123 return right; 124 if (original == right) 125 return left; 126 return original; 127 } 128 120 129 // Address: 121 130 // … … 131 140 { 132 141 return Address(base, offset + additionalOffset); 142 } 143 144 Address withSwappedRegister(RegisterID left, RegisterID right) 145 { 146 return Address(AbstractMacroAssembler::withSwappedRegister(base, left, right), offset); 133 147 } 134 148 … … 201 215 { 202 216 return BaseIndex(base, index, scale, offset + additionalOffset); 217 } 218 219 BaseIndex withSwappedRegister(RegisterID left, RegisterID right) 220 { 221 return BaseIndex(AbstractMacroAssembler::withSwappedRegister(base, left, right), AbstractMacroAssembler::withSwappedRegister(index, left, right), scale, offset); 203 222 } 204 223 }; … … 703 722 void append(Jump jump) 704 723 { 705 m_jumps.append(jump); 724 if (jump.isSet()) 725 m_jumps.append(jump); 706 726 } 707 727 -
trunk/Source/JavaScriptCore/assembler/CPU.h
r214253 r215565 1 1 /* 2 * Copyright (C) 2008 , 2012-2015Apple Inc. All rights reserved.2 * Copyright (C) 2008-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 66 66 } 67 67 68 inline bool is64Bit() 69 { 70 #if USE(JSVALUE64) 71 return true; 72 #else 73 return false; 74 #endif 75 } 76 77 inline bool is32Bit() 78 { 79 return !is64Bit(); 80 } 81 68 82 inline bool isMIPS() 69 83 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
r214384 r215565 3509 3509 } 3510 3510 3511 void atomicStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3511 template<typename AddressType> 3512 void atomicStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3512 3513 { 3513 3514 atomicStrongCAS<8>(cond, expectedAndResult, newValue, address, result); 3514 3515 } 3515 3516 3516 void atomicStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3517 template<typename AddressType> 3518 void atomicStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3517 3519 { 3518 3520 atomicStrongCAS<16>(cond, expectedAndResult, newValue, address, result); 3519 3521 } 3520 3522 3521 void atomicStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3523 template<typename AddressType> 3524 void atomicStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3522 3525 { 3523 3526 atomicStrongCAS<32>(cond, expectedAndResult, newValue, address, result); 3524 3527 } 3525 3528 3526 void atomicStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3529 template<typename AddressType> 3530 void atomicStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3527 3531 { 3528 3532 atomicStrongCAS<64>(cond, expectedAndResult, newValue, address, result); 3529 3533 } 3530 3534 3531 void atomicRelaxedStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3535 template<typename AddressType> 3536 void atomicRelaxedStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3532 3537 { 3533 3538 atomicRelaxedStrongCAS<8>(cond, expectedAndResult, newValue, address, result); 3534 3539 } 3535 3540 3536 void atomicRelaxedStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3541 template<typename AddressType> 3542 void atomicRelaxedStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3537 3543 { 3538 3544 atomicRelaxedStrongCAS<16>(cond, expectedAndResult, newValue, address, result); 3539 3545 } 3540 3546 3541 void atomicRelaxedStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3547 template<typename AddressType> 3548 void atomicRelaxedStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3542 3549 { 3543 3550 atomicRelaxedStrongCAS<32>(cond, expectedAndResult, newValue, address, result); 3544 3551 } 3545 3552 3546 void atomicRelaxedStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3553 template<typename AddressType> 3554 void atomicRelaxedStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 3547 3555 { 3548 3556 atomicRelaxedStrongCAS<64>(cond, expectedAndResult, newValue, address, result); 3549 3557 } 3550 3558 3551 JumpList branchAtomicWeakCAS8(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3559 template<typename AddressType> 3560 JumpList branchAtomicWeakCAS8(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3552 3561 { 3553 3562 return branchAtomicWeakCAS<8>(cond, expectedAndClobbered, newValue, address); 3554 3563 } 3555 3564 3556 JumpList branchAtomicWeakCAS16(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3565 template<typename AddressType> 3566 JumpList branchAtomicWeakCAS16(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3557 3567 { 3558 3568 return branchAtomicWeakCAS<16>(cond, expectedAndClobbered, newValue, address); 3559 3569 } 3560 3570 3561 JumpList branchAtomicWeakCAS32(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3571 template<typename AddressType> 3572 JumpList branchAtomicWeakCAS32(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3562 3573 { 3563 3574 return branchAtomicWeakCAS<32>(cond, expectedAndClobbered, newValue, address); 3564 3575 } 3565 3576 3566 JumpList branchAtomicWeakCAS64(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3577 template<typename AddressType> 3578 JumpList branchAtomicWeakCAS64(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3567 3579 { 3568 3580 return branchAtomicWeakCAS<64>(cond, expectedAndClobbered, newValue, address); 3569 3581 } 3570 3582 3571 JumpList branchAtomicRelaxedWeakCAS8(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3583 template<typename AddressType> 3584 JumpList branchAtomicRelaxedWeakCAS8(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3572 3585 { 3573 3586 return branchAtomicRelaxedWeakCAS<8>(cond, expectedAndClobbered, newValue, address); 3574 3587 } 3575 3588 3576 JumpList branchAtomicRelaxedWeakCAS16(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3589 template<typename AddressType> 3590 JumpList branchAtomicRelaxedWeakCAS16(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3577 3591 { 3578 3592 return branchAtomicRelaxedWeakCAS<16>(cond, expectedAndClobbered, newValue, address); 3579 3593 } 3580 3594 3581 JumpList branchAtomicRelaxedWeakCAS32(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3595 template<typename AddressType> 3596 JumpList branchAtomicRelaxedWeakCAS32(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3582 3597 { 3583 3598 return branchAtomicRelaxedWeakCAS<32>(cond, expectedAndClobbered, newValue, address); 3584 3599 } 3585 3600 3586 JumpList branchAtomicRelaxedWeakCAS64(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address) 3601 template<typename AddressType> 3602 JumpList branchAtomicRelaxedWeakCAS64(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 3587 3603 { 3588 3604 return branchAtomicRelaxedWeakCAS<64>(cond, expectedAndClobbered, newValue, address); … … 4173 4189 void storeCondRel(RegisterID src, RegisterID dest, RegisterID result) 4174 4190 { 4175 m_assembler.stlxr<datasize>( src, dest, result);4191 m_assembler.stlxr<datasize>(result, src, dest); 4176 4192 } 4177 4193 … … 4214 4230 } 4215 4231 4216 template<int datasize >4217 void atomicRelaxedStrongCAS(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result)4232 template<int datasize, typename AddressType> 4233 void atomicRelaxedStrongCAS(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, AddressType address, RegisterID result) 4218 4234 { 4219 4235 signExtend<datasize>(expectedAndResult, expectedAndResult); … … 4238 4254 } 4239 4255 4240 template<int datasize >4241 JumpList branchAtomicWeakCAS(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address)4256 template<int datasize, typename AddressType> 4257 JumpList branchAtomicWeakCAS(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 4242 4258 { 4243 4259 signExtend<datasize>(expectedAndClobbered, expectedAndClobbered); … … 4266 4282 } 4267 4283 4268 template<int datasize >4269 JumpList branchAtomicRelaxedWeakCAS(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, Address address)4284 template<int datasize, typename AddressType> 4285 JumpList branchAtomicRelaxedWeakCAS(StatusCondition cond, RegisterID expectedAndClobbered, RegisterID newValue, AddressType address) 4270 4286 { 4271 4287 signExtend<datasize>(expectedAndClobbered, expectedAndClobbered); … … 4304 4320 } 4305 4321 4322 // This uses both the memory and data temp, but only returns the memorty temp. So you can use the 4323 // data temp after this finishes. 4324 RegisterID extractSimpleAddress(BaseIndex address) 4325 { 4326 RegisterID result = getCachedMemoryTempRegisterIDAndInvalidate(); 4327 lshift64(address.index, TrustedImm32(address.scale), result); 4328 add64(address.base, result); 4329 add64(TrustedImm32(address.offset), result); 4330 return result; 4331 } 4332 4306 4333 Jump jumpAfterFloatingPointCompare(DoubleCondition cond) 4307 4334 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
r214384 r215565 3024 3024 void atomicStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3025 3025 { 3026 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base); });3026 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base); }); 3027 3027 } 3028 3028 3029 3029 void atomicStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address, RegisterID result) 3030 3030 { 3031 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base, address.index, address.scale); });3031 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3032 3032 } 3033 3033 3034 3034 void atomicStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3035 3035 { 3036 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base); });3036 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base); }); 3037 3037 } 3038 3038 3039 3039 void atomicStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address, RegisterID result) 3040 3040 { 3041 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base, address.index, address.scale); });3041 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3042 3042 } 3043 3043 3044 3044 void atomicStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 3045 3045 { 3046 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base); });3046 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base); }); 3047 3047 } 3048 3048 3049 3049 void atomicStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address, RegisterID result) 3050 3050 { 3051 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base, address.index, address.scale); });3051 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3052 3052 } 3053 3053 3054 3054 void atomicStrongCAS8(RegisterID expectedAndResult, RegisterID newValue, Address address) 3055 3055 { 3056 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base); });3056 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base); }); 3057 3057 } 3058 3058 3059 3059 void atomicStrongCAS8(RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 3060 3060 { 3061 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base, address.index, address.scale); });3061 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3062 3062 } 3063 3063 3064 3064 void atomicStrongCAS16(RegisterID expectedAndResult, RegisterID newValue, Address address) 3065 3065 { 3066 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base); });3066 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base); }); 3067 3067 } 3068 3068 3069 3069 void atomicStrongCAS16(RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 3070 3070 { 3071 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base, address.index, address.scale); });3071 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3072 3072 } 3073 3073 3074 3074 void atomicStrongCAS32(RegisterID expectedAndResult, RegisterID newValue, Address address) 3075 3075 { 3076 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base); });3076 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base); }); 3077 3077 } 3078 3078 3079 3079 void atomicStrongCAS32(RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 3080 3080 { 3081 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base, address.index, address.scale); });3081 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3082 3082 } 3083 3083 3084 3084 Jump branchAtomicStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address) 3085 3085 { 3086 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base); });3086 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base); }); 3087 3087 } 3088 3088 3089 3089 Jump branchAtomicStrongCAS8(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 3090 3090 { 3091 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base, address.index, address.scale); });3091 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgb_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3092 3092 } 3093 3093 3094 3094 Jump branchAtomicStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address) 3095 3095 { 3096 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base); });3096 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base); }); 3097 3097 } 3098 3098 3099 3099 Jump branchAtomicStrongCAS16(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 3100 3100 { 3101 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base, address.index, address.scale); });3101 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgw_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3102 3102 } 3103 3103 3104 3104 Jump branchAtomicStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address) 3105 3105 { 3106 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base); });3106 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base); }); 3107 3107 } 3108 3108 3109 3109 Jump branchAtomicStrongCAS32(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 3110 3110 { 3111 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base, address.index, address.scale); });3111 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgl_rm(newValue, address.offset, address.base, address.index, address.scale); }); 3112 3112 } 3113 3113 … … 4073 4073 } 4074 4074 4075 template<typename Func> 4076 void atomicStrongCAS(StatusCondition cond, RegisterID expectedAndResult, RegisterID result, const Func& func) 4077 { 4075 template<typename AddressType, typename Func> 4076 void atomicStrongCAS(StatusCondition cond, RegisterID expectedAndResult, RegisterID result, AddressType& address, const Func& func) 4077 { 4078 address = address.withSwappedRegister(X86Registers::eax, expectedAndResult); 4078 4079 swap(expectedAndResult, X86Registers::eax); 4079 4080 m_assembler.lock(); … … 4083 4084 } 4084 4085 4085 template<typename Func> 4086 void atomicStrongCAS(RegisterID expectedAndResult, const Func& func) 4087 { 4086 template<typename AddressType, typename Func> 4087 void atomicStrongCAS(RegisterID expectedAndResult, AddressType& address, const Func& func) 4088 { 4089 address = address.withSwappedRegister(X86Registers::eax, expectedAndResult); 4088 4090 swap(expectedAndResult, X86Registers::eax); 4089 4091 m_assembler.lock(); … … 4092 4094 } 4093 4095 4094 template<typename Func> 4095 Jump branchAtomicStrongCAS(StatusCondition cond, RegisterID expectedAndResult, const Func& func) 4096 { 4096 template<typename AddressType, typename Func> 4097 Jump branchAtomicStrongCAS(StatusCondition cond, RegisterID expectedAndResult, AddressType& address, const Func& func) 4098 { 4099 address = address.withSwappedRegister(X86Registers::eax, expectedAndResult); 4097 4100 swap(expectedAndResult, X86Registers::eax); 4098 4101 m_assembler.lock(); -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h
r214384 r215565 1436 1436 void atomicStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address, RegisterID result) 1437 1437 { 1438 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base); });1438 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base); }); 1439 1439 } 1440 1440 1441 1441 void atomicStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address, RegisterID result) 1442 1442 { 1443 atomicStrongCAS(cond, expectedAndResult, result, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base, address.index, address.scale); });1443 atomicStrongCAS(cond, expectedAndResult, result, address, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base, address.index, address.scale); }); 1444 1444 } 1445 1445 1446 1446 void atomicStrongCAS64(RegisterID expectedAndResult, RegisterID newValue, Address address) 1447 1447 { 1448 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base); });1448 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base); }); 1449 1449 } 1450 1450 1451 1451 void atomicStrongCAS64(RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 1452 1452 { 1453 atomicStrongCAS(expectedAndResult, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base, address.index, address.scale); });1453 atomicStrongCAS(expectedAndResult, address, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base, address.index, address.scale); }); 1454 1454 } 1455 1455 1456 1456 Jump branchAtomicStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, Address address) 1457 1457 { 1458 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base); });1458 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base); }); 1459 1459 } 1460 1460 1461 1461 Jump branchAtomicStrongCAS64(StatusCondition cond, RegisterID expectedAndResult, RegisterID newValue, BaseIndex address) 1462 1462 { 1463 return branchAtomicStrongCAS(cond, expectedAndResult, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base, address.index, address.scale); });1463 return branchAtomicStrongCAS(cond, expectedAndResult, address, [&] { m_assembler.cmpxchgq_rm(newValue, address.offset, address.base, address.index, address.scale); }); 1464 1464 } 1465 1465
Note:
See TracChangeset
for help on using the changeset viewer.