/arkcompiler/runtime_core/static_core/runtime/tests/ |
H A D | math_helpers_test.cpp | 35 size_t shift = 5; in TestBitShl() local 36 T res = bit_shl<T>()(v, shift); in TestBitShl() 37 EXPECT_EQ(res, v << shift) << ss.str(); in TestBitShl() 42 size_t shift = std::numeric_limits<UnsignedType>::digits - 1; in TestBitShl() local 43 T res = bit_shl<T>()(v, shift); in TestBitShl() 44 EXPECT_EQ(res, static_cast<T>(v << shift)) << ss.str(); in TestBitShl() 49 size_t shift = std::numeric_limits<UnsignedType>::digits; in TestBitShl() local 50 T res = bit_shl<T>()(v, shift); in TestBitShl() 56 size_t shift = std::numeric_limits<UnsignedType>::digits + 2; in TestBitShl() local 57 T res = bit_shl<T>()(v, shift); in TestBitShl() 74 T shift = 5; TestBitShr() local 81 T shift = std::numeric_limits<UnsignedType>::digits - 1; TestBitShr() local 88 T shift = std::numeric_limits<UnsignedType>::digits; TestBitShr() local 96 T shift = std::numeric_limits<UnsignedType>::digits + 2; TestBitShr() local 114 T shift = 5; TestBitAshr() local 121 T shift = std::numeric_limits<UnsignedType>::digits - 1; TestBitAshr() local 128 T shift = std::numeric_limits<UnsignedType>::digits; TestBitAshr() local 136 T shift = std::numeric_limits<UnsignedType>::digits + 2; TestBitAshr() local [all...] |
/arkcompiler/runtime_core/libpandabase/utils/ |
H A D | leb128.h | 45 size_t shift = i * PAYLOAD_WIDTH; in DecodeUnsigned() local 46 result |= static_cast<T>(byte) << shift; in DecodeUnsigned() 49 bool is_full = MinimumBitsToStore(byte) <= (BITWIDTH - shift); in DecodeUnsigned() 109 size_t shift = i * PAYLOAD_WIDTH; 111 result |= static_cast<unsigned_type>(byte & PAYLOAD_MASK) << shift; 114 shift = BITWIDTH - shift; 119 bool is_full = MinimumBitsToStore(masked) <= shift; 120 if (shift > PAYLOAD_WIDTH) { 121 shift [all...] |
H A D | bit_memory_region.h | 133 size_t shift = (start_ + offset) % BITS_PER_BYTE; in Read() 135 return (data_[index] & (1U << shift)) != 0; in Read() 142 size_t shift = (start_ + offset) % BITS_PER_BYTE; 144 data_[index] &= ~(1U << shift); 146 data_[index] |= ((value ? 1U : 0U) << shift); 167 size_t shift = (start_ + offset) % width; 169 T value = data[index] >> shift; 171 T extra = data[index + (shift + (length - 1)) / width]; 173 return (value | (extra << ((width - shift) & (width - 1)))) & ~clear; 212 size_t shift [all...] |
/arkcompiler/runtime_core/static_core/libpandabase/utils/ |
H A D | leb128.h | 45 size_t shift = i * PAYLOAD_WIDTH; in DecodeUnsigned() local 47 result |= static_cast<T>(byte) << shift; in DecodeUnsigned() 50 bool isFull = MinimumBitsToStore(byte) <= (BITWIDTH - shift); in DecodeUnsigned() 114 size_t shift = i * PAYLOAD_WIDTH; 116 result |= static_cast<UnsignedType>(byte & PAYLOAD_MASK) << shift; 119 shift = BITWIDTH - shift; 124 bool isFull = MinimumBitsToStore(masked) <= shift; 125 if (shift > PAYLOAD_WIDTH) { 126 shift [all...] |
H A D | bit_memory_region.h | 136 size_t shift = (start_ + offset) % BITS_PER_BYTE; in Read() 138 return (data_[index] & (1U << shift)) != 0; in Read() 145 size_t shift = (start_ + offset) % BITS_PER_BYTE; 147 data_[index] &= ~(1U << shift); 149 data_[index] |= ((value ? 1U : 0U) << shift); 170 size_t shift = (start_ + offset) % width; 172 T value = data[index] >> shift; 174 T extra = data[index + (shift + (length - 1)) / width]; 176 return (value | (extra << ((width - shift) & (width - 1)))) & ~clear; 215 size_t shift [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/aarch64/ |
H A D | assembler_aarch64.cpp | 290 uint32_t shift = GetShiftOfLdr(operand, scale, regX); in Ldr() local 295 uint32_t shiftField = (shift << LDR_STR_S_LOWBITS) & LDR_STR_S_MASK; in Ldr() 391 for (unsigned int shift = 0; shift < regSize; shift += HWORDSIZE) { in Mov() 392 const unsigned int halfWord = (immValue >> shift) & HWORD_MASK; in Mov() 418 for (unsigned int shift = 0; shift < regSize; shift += HWORDSIZE) { in Mov() 419 uint64_t shiftedMask = (HWORD_MASK << shift); in Mov() 592 int shift = 0; TryReplicateHWords() local 658 Movz(const Register &rd, uint64_t imm, int shift) Movz() argument 663 Movk(const Register &rd, uint64_t imm, int shift) Movk() argument 668 Movn(const Register &rd, uint64_t imm, int shift) Movn() argument 673 MovWide(uint32_t op, const Register &rd, uint64_t imm, int shift) MovWide() argument 762 Lsr(const Register &rd, const Register &rn, unsigned shift) Lsr() argument 855 uint32_t shift = 0; AddSubImm() local 1232 uint32_t shift = 0; GetShiftOfLdr() local [all...] |
H A D | assembler_aarch64.h | 164 Operand(Register reg, Shift shift = Shift::LSL, uint8_t shift_amount = 0) in Operand() 165 : reg_(reg), extend_(Extend::NO_EXTEND), shift_(shift), shiftAmount_(shift_amount), immediate_(0) in Operand() 233 MemoryOperand(Register base, Register offset, Shift shift = Shift::NO_SHIFT, uint8_t shiftAmount = 0) in MemoryOperand() 235 extend_(Extend::NO_EXTEND), shift_(shift), shiftAmount_(shiftAmount) in MemoryOperand() 312 void Movz(const Register &rd, uint64_t imm, int shift); 313 void Movk(const Register &rd, uint64_t imm, int shift); 314 void Movn(const Register &rd, uint64_t imm, int shift); 321 void Lsr(const Register &rd, const Register &rn, unsigned shift); 410 void MovWide(uint32_t op, const Register &rd, uint64_t imm, int shift);
|
/arkcompiler/ets_runtime/test/moduletest/arrayshift/ |
H A D | arrayshift.js | 20 a1.shift() 28 var result1 = arr1.shift(); 33 var result2 = arr2.shift();
|
/arkcompiler/runtime_core/static_core/compiler/tests/ |
H A D | fast_divisor_test.cpp | 24 explicit SignedResult(int64_t aMagic, int64_t aShift) : magic(aMagic), shift(aShift) {} in SignedResult() 27 int64_t shift {0L}; 31 explicit UnsignedResult(uint64_t aMagic, uint64_t aShift, bool anAdd) : magic(aMagic), shift(aShift), add(anAdd) {} in UnsignedResult() 34 uint64_t shift {0U}; 45 EXPECT_EQ(res.shift, fastDiv.GetShift()); in TEST() 66 EXPECT_EQ(res.shift, fastDiv.GetShift()); in TEST() 87 EXPECT_EQ(res.shift, fastDiv.GetShift()); in TEST() 109 EXPECT_EQ(res.shift, fastDiv.GetShift()); in TEST()
|
/arkcompiler/runtime_core/static_core/assembler/utils/ |
H A D | number-utils.h | 33 inline bool ValidateXToken(std::string_view token, size_t shift) in ValidateXToken() argument 35 token.remove_prefix(shift); in ValidateXToken() 46 inline bool ValidateBToken(std::string_view token, size_t shift) in ValidateBToken() argument 48 token.remove_prefix(shift); in ValidateBToken()
|
/arkcompiler/ets_runtime/ecmascript/stackmap/litecg/ |
H A D | litecg_stackmap_type.cpp | 21 uint64_t shift = 0; in DecodeSLEB128() local 33 res |= (static_cast<uint64_t>(low7Bit) << shift); in DecodeSLEB128() 34 shift += DATA_BITS_SHIFT; in DecodeSLEB128() 38 if (shift < BIT_SIZE_64 && (byte & FLAG_MASK) != 0) { in DecodeSLEB128() 39 res |= UINT64_MAX << shift; in DecodeSLEB128()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/include/ |
H A D | mpl_int_val.h | 237 /// @brief shift-left operator 240 DEBUG_ASSERT(bits <= width, "invalid shift value"); in operator <<() 249 /// @brief shift-right operator 250 /// @note if value is signed this operator works as arithmetic shift-right operator, 251 /// otherwise it's logical shift-right operator 254 DEBUG_ASSERT(bits <= width, "invalid shift value"); in operator >>() 358 // left-shift operators 359 IntVal Shl(const IntVal &shift, PrimType pType) const in Shl() argument 361 return Shl(shift.value, pType); in Shl() 364 IntVal Shl(uint64 shift, PrimTyp argument 370 LShr(const IntVal &shift, PrimType pType) const LShr() argument 375 LShr(uint64 shift, PrimType pType) const LShr() argument 392 AShr(const IntVal &shift, PrimType pType) const AShr() argument 397 AShr(uint64 shift, PrimType pType) const AShr() argument [all...] |
/arkcompiler/runtime_core/libpandafile/ |
H A D | proto_data_accessor-inl.h | 45 size_t shift = (elem_num_ % SHORTY_ELEM_PER16) * SHORTY_ELEM_WIDTH; in EnumerateTypes() local 46 uint8_t elem = (v >> shift) & SHORTY_ELEM_MASK; in EnumerateTypes() 81 size_t shift = (shorty_idx % SHORTY_ELEM_PER16) * SHORTY_ELEM_WIDTH; in IsEqual() local 82 uint8_t s1 = (v1 >> shift) & SHORTY_ELEM_MASK; // NOLINT(hicpp-signed-bitwise) in IsEqual() 83 uint8_t s2 = (v2 >> shift) & SHORTY_ELEM_MASK; // NOLINT(hicpp-signed-bitwise) in IsEqual()
|
/arkcompiler/runtime_core/static_core/libpandafile/ |
H A D | proto_data_accessor-inl.h | 46 size_t shift = (elemNum_ % SHORTY_ELEM_PER16) * SHORTY_ELEM_WIDTH; in EnumerateTypes() local 47 uint8_t elem = (v >> shift) & SHORTY_ELEM_MASK; in EnumerateTypes() 83 size_t shift = (shortyIdx % SHORTY_ELEM_PER16) * SHORTY_ELEM_WIDTH; in IsEqual() local 84 uint8_t s1 = (v1 >> shift) & SHORTY_ELEM_MASK; // NOLINT(hicpp-signed-bitwise) in IsEqual() 85 uint8_t s2 = (v2 >> shift) & SHORTY_ELEM_MASK; // NOLINT(hicpp-signed-bitwise) in IsEqual()
|
/arkcompiler/runtime_core/static_core/runtime/interpreter/ |
H A D | math_helpers.h | 33 size_t shift = static_cast<UnsignedType>(y) & mask; in operator ()() local 34 return static_cast<T>(static_cast<UnsignedType>(x) << shift); in operator ()() 44 size_t shift = static_cast<UnsignedType>(y) & mask; in operator ()() local 45 return static_cast<T>(static_cast<UnsignedType>(x) >> shift); in operator ()() 55 size_t shift = static_cast<UnsignedType>(y) & mask; in operator ()() local 56 return x >> shift; // NOLINT(hicpp-signed-bitwise) in operator ()()
|
/arkcompiler/ets_runtime/ecmascript/deoptimizer/ |
H A D | deoptimizer.cpp | 96 void Deoptimizier::CollectVregs(const std::vector<kungfu::ARKDeopt>& deoptBundle, size_t shift) in CollectVregs() argument 124 size_t curDepth = DecodeDeoptDepth(id, shift); in CollectVregs() 125 OffsetType vregId = static_cast<OffsetType>(DecodeVregIndex(id, shift)); in CollectVregs() 619 int32_t Deoptimizier::EncodeDeoptVregIndex(int32_t index, size_t depth, size_t shift) in EncodeDeoptVregIndex() argument 622 return (index << shift) | depth; in EncodeDeoptVregIndex() 624 return -((-index << shift) | depth); in EncodeDeoptVregIndex() 629 size_t shift = 0; in ComputeShift() local 631 shift = std::floor(std::log2(depth)) + 1; in ComputeShift() 633 return shift; in ComputeShift() 636 int32_t Deoptimizier::DecodeVregIndex(OffsetType id, size_t shift) in DecodeVregIndex() argument 644 DecodeDeoptDepth(OffsetType id, size_t shift) DecodeDeoptDepth() argument [all...] |
H A D | deoptimizer.h | 118 void CollectVregs(const std::vector<kungfu::ARKDeopt>& deoptBundle, size_t shift); 125 static PUBLIC_API int32_t EncodeDeoptVregIndex(int32_t index, size_t depth, size_t shift); 127 static int32_t DecodeVregIndex(OffsetType id, size_t shift); 128 static size_t DecodeDeoptDepth(OffsetType id, size_t shift);
|
/arkcompiler/runtime_core/static_core/plugins/ets/compiler/ |
H A D | ir_build_intrinsics_ets.cpp | 46 auto shift = in BuildIsFiniteIntrinsic() local 48 auto mask = GetGraph()->CreateInstAnd(itype, GetPc(bcInst->GetAddress()), shift, FindOrCreateConstant(fpExpMask)); in BuildIsFiniteIntrinsic() 52 AddInstruction(bitcast, shift, mask, cmp); in BuildIsFiniteIntrinsic()
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | number_gate_info.h | 281 return ((static_cast<uint32_t>(rhs.max_) & 0x1f) == 0) && (min_< 0); // 0x1f : shift bits in MaybeShrOverflow() 292 int32_t shift = rhs.max_ & 0x1f; // 0x1f : shift bits in SHR() local 295 int32_t nmin = bit_cast<int32_t>(tempMin >> shift); in SHR() 296 int32_t nmax = bit_cast<int32_t>(tempMax >> shift); in SHR() 304 int32_t shift = rhs.max_ & 0x1f; // 0x1f : shift bits in ASHR() local 305 int32_t nmin = min_ >> shift; in ASHR() 306 int32_t nmax = max_ >> shift; in ASHR()
|
H A D | range_analysis.cpp | 236 auto shift = GetRange(acc_.GetValueIn(gate, 1)); in GetRangeOfShift() local 237 if (value.IsNone() || shift.IsNone()) { in GetRangeOfShift() 240 if (shift.GetMin() != shift.GetMax()) { in GetRangeOfShift() 245 return value.SHR(shift); in GetRangeOfShift() 247 return value.ASHR(shift); in GetRangeOfShift()
|
/arkcompiler/ets_runtime/test/moduletest/regressdefineproperty/ |
H A D | regressdefineproperty.js | 40 array.shift() 48 Array.prototype.shift.call(object)
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/aarch64/ |
H A D | aarch64_obj_emitter.cpp | 454 uint32 shift = exendOpnd.GetShiftAmount(); in GetOpndMachineValue() local 457 return option | shift; in GetOpndMachineValue() 725 uint32 shift = 0x1; 726 opnd |= shift << kShiftTwentyTwo; 776 uint32 shift = 0; 779 shift = kShiftLSL; 782 shift = kShiftLSR; 785 shift = kShiftASR; 791 opnd |= shift << kShiftTwentyTwo; 809 uint32 shift [all...] |
/arkcompiler/ets_frontend/ets2panda/checker/ets/ |
H A D | arithmetic.h | 200 auto shift = unsignedRightValue & mask; in HandleBitWiseArithmetic() local 221 result = unsignedLeftValue << shift; in HandleBitWiseArithmetic() 227 result = static_cast<IntegerUType>(unsignedLeftValue) >> shift; // NOLINT(hicpp-signed-bitwise) in HandleBitWiseArithmetic() 233 result = unsignedLeftValue >> shift; in HandleBitWiseArithmetic()
|
/arkcompiler/ets_runtime/test/moduletest/hugearray/ |
H A D | hugearray_first.js | 25 arr.shift();
|
/arkcompiler/ets_runtime/ecmascript/ic/ |
H A D | ic_binary_op.h | 302 uint32_t shift = in ShlWithTSType() local 306 static_cast<int32_t>(static_cast<unsigned_type>(opNumber0) << shift); // NOLINT(hicpp-signed-bitwise) in ShlWithTSType() 318 uint32_t shift = in ShrWithTSType() local 320 auto ret = static_cast<int32_t>(opNumber0 >> shift); // NOLINT(hicpp-signed-bitwise) in ShrWithTSType() 332 uint32_t shift = in AshrWithTSType() local 336 static_cast<uint32_t>(static_cast<unsigned_type>(opNumber0) >> shift); // NOLINT(hicpp-signed-bitwise) in AshrWithTSType()
|