| /arkcompiler/runtime_core/docs/ |
| D | 2022-08-18-isa-changelog.md | 1 # 2022-08-18-isa-changelog 15 3. We add prefix "deprecated" and keep the many old isa as "deprecated"-prefixed opcodes (for compa… 20 8. We add 8-bit or 16-bit imm as inline cache slot for some specific opcodes. 23 As we merge some "define-function" opcodes as one opcode, in function we add one field which record… 24 such that runtime can distinguish the "define-function" operations of different kinds. 26 We reuse the field 32-bit field `access_flags_` to encode Function Kind and Header index. 27 This will not introduce compatibility issue because the later 24-bit of `access_flags_` is unused i… 30 |<- 16-bit header index ->|<- 8-bit function kind ->|<- 8-bit original access flag ->| 39 As we use 16-bit to encode methodId, stringId and literalarrayId, the number of these Ids in one me… 45 3. In bytecode, we still use 16-bit literalarrayId rather than offset. [all …]
|
| D | code_metainfo.md | 5 Metainfo is an information that aims to provide reg-to-stack mapping for virtual registers. It is n… 14 +-------------+ 16 | +-------------------+ 20 +-------------+-------------------+ 21 | | <-- Method::CompiledCodeEntrypoint 24 +-------------+-----------------+ 26 | |-----------------+----------------------+ 31 | | Bit Tables | Method indexes | 37 |-------------+-----------------+----------------------+ 40 ## Bit table [all …]
|
| D | assembly_format.md | 5 … assembly file format for Panda platform. Assembly files are human-readable and human-writeable pl… 11 …-to-byte-code language with a minimal feature set. All language-specific "traits" that should be s… 28 …-point decimal/hexadecimal literals that can be represented with IEEE 754. Hexadecimal floating-po… 32 …e of any characters enclosed in `"` characters. Non-printable characters and characters out of Lat… 36 - `\"` double quote, `\x22` 37 - `\a` alert, `\x07` 38 - `\b` backspace, `\x08` 39 - `\f` form feed, `\x0c` 40 - `\n` newline, `\x0a` 41 - `\r` carriage return, `\x0d` [all …]
|
| /arkcompiler/ets_runtime/ecmascript/snapshot/mem/ |
| D | encode_bit.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 29 * 16bit 8bit 1bit 1bit 1bit 8bit 1bit 18bit 10bit 44 // encode bit 48 static constexpr int OBJECT_TYPE_BIT_NUMBER = 8; // js_type 51 static constexpr int UNUSED_BIT_NUMBER = 9; // unused bit number
|
| /arkcompiler/runtime_core/runtime/bridge/arch/x86/ |
| D | interpreter_to_compiled_code_bridge_x86.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 27 cmpl $(SHORTY_NUM_64BIT_TYPES - 1), %ecx 30 // it is a 32bit value 36 // it is a 64bit value 41 addl $8, \stack_ptr 51 movl 8(\arg_ptr), \tmp1 53 movl \tmp1, 8(\stack_ptr) 62 // %eax - SHORTY_PTR_REG 63 // %edx - SHORTY_REG [all …]
|
| D | compiled_code_to_interpreter_bridge_x86.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 32 // %esp % 16 == 12 here (-4 == 12 (mod 16)) 62 // %esp % 16 == 8 here 65 leal -8(%ebp), %ecx // prev* 69 // %esp should be 16-byte aligned here 71 addl $8, %esp // cleanup 76 …// %eax - SHORTY_PTR_REG, %edx - SHORTY_REG, %ecx - shorty value, %edi - iframe.vregs_ + num_vregs… 77 // %esi - args, (%esp) - iframe* 84 leal 8(%ebp), %esi // args [all …]
|
| /arkcompiler/runtime_core/runtime/bridge/arch/arm/ |
| D | interpreter_to_compiled_code_bridge_arm.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 28 cmp r2, #(SHORTY_NUM_64BIT_TYPES - 1) 30 // it is a 32bit value 34 1: // it is a 64bit value 36 add \stack_ptr, \stack_ptr, #7 // round the address up to 8 byte boundary 42 add \stack_ptr, \stack_ptr, #7 // round the address up to 8 byte boundary 67 bic sp, sp, #7 // round downd sp to 8byte boundary 72 // r0 - SHORTY_PTR_REG 73 // r1 - SHORTY_REG [all …]
|
| D | interpreter_to_compiled_code_bridge_armhf.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 24 // load arguments into r0-r4 while begin_ptr != end_ptr 25 ldr r0, [\begin_ptr, #-4]! 28 ldr r1, [\begin_ptr, #-4]! 31 ldr r2, [\begin_ptr, #-4]! 34 ldr r3, [\begin_ptr, #-4]! 39 // load arguments into d0-d7 while \begin_ptr != \end_ptr 80 // it is a 32bit int or reference 85 strlt \tmp1, [\gpr_ptr, #-4]! [all …]
|
| D | compiled_code_to_interpreter_bridge_arm.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 36 // store r0-r3 before the frame to make arg array continuos with stack args 37 push {r0-r3} 43 CFI_ADJUST_CFA_OFFSET(8) 46 CFI_ADJUST_CFA_OFFSET(8) 49 CFI_ADJUST_CFA_OFFSET(-4) 57 push {r4 - r10} 58 CFI_REL_OFFSET(r10, -(2 * 4)) 59 CFI_REL_OFFSET(r9, -(3 * 4)) [all …]
|
| D | compiled_code_to_interpreter_bridge_armhf.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 42 str ip, [sp, #8] 53 push {r4 - r10} 54 CFI_REL_OFFSET(r10, -(2 * 4)) 55 CFI_REL_OFFSET(r9, -(3 * 4)) 56 CFI_REL_OFFSET(r8, -(4 * 4)) 57 CFI_REL_OFFSET(r7, -(5 * 4)) 58 CFI_REL_OFFSET(r6, -(6 * 4)) 59 CFI_REL_OFFSET(r5, -(7 * 4)) [all …]
|
| /arkcompiler/ets_frontend/es2panda/util/ |
| D | base64.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 28 …for (size_t i = 0, j = 0; i < encodedRes.length() - 2; i += TRANSFORMED_CHAR_NUM, j += TO_TRANSFOR… in Base64Encode() 29 // convert three 8bit into four 6bit; then add two 0 bit in each 6 bit in Base64Encode() 41 encodedRes[encodedRes.length() - 2] = '='; in Base64Encode() 42 encodedRes[encodedRes.length() - 1] = '='; in Base64Encode() 45 encodedRes[encodedRes.length() - 1] = '='; in Base64Encode() 56 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in Base64Decode() 57 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in Base64Decode() 58 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in Base64Decode() 59 -1, -1, -1, -1, -1, -1, -1, in Base64Decode() [all …]
|
| /arkcompiler/runtime_core/libpandabase/utils/ |
| D | bit_field.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 29 static constexpr unsigned BITS_PER_BYTE = 8; 53 * Make BitField type that follows right after current bit range. 68 * Make Flag field that follows right after current bit range. 75 * Return maximum value that fits bit range [START_BIT : START_BIT+END_BIT] 79 return (1LLU << bits_num) - 1; in MaxValue() 83 * Return mask of bit range, f.e. 0b1110 for BitField<T, 1, 3> 91 * Check if given value fits into the bit field 99 * Set 'value' to current bit range [START_BIT : START_BIT+END_BIT] within the 'stor' parameter. [all …]
|
| D | math_helpers.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 30 * @param X - should be power of 2 35 ASSERT((X > 0) && !(X & (X - 1U))); in GetIntLog2() 41 * @param X - of type uint64_t, should be power of 2 46 ASSERT((X > 0) && !(X & (X - 1U))); in GetIntLog2() 57 return (value & (value - 1)) == 0; in IsPowerOfTwo() 67 --value; in GetPowerOfTwoValue32() 72 constexpr uint32_t BIT = 32UL; in GetPowerOfTwoValue32() local 73 return 1UL << (BIT - Clz(static_cast<uint32_t>(value))); in GetPowerOfTwoValue32() [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | interface_inline_cache.md | 11 * There is a 90% - 95% chance that the same method will be used in real-world application test. 20 * must be 64bit system 27 Cache structure:(offset addr)/(class addr) 32bit/32bit 28 ----------------------------------------------- 31 cache:offset/class ---------->| <-| 35 --> call runtime irtoc function | | 36 read cache <-----------------------| | 41 save method‘s offset to cache >------| 42 <-- return to (.text) 44 ----------------------------------------------- [all …]
|
| /arkcompiler/runtime_core/runtime/bridge/arch/amd64/ |
| D | interpreter_to_compiled_code_bridge_amd64.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 26 addq $8, \begin_ptr 31 addq $8, \begin_ptr 36 addq $8, \begin_ptr 41 addq $8, \begin_ptr 46 addq $8, \begin_ptr 51 addq $8, \begin_ptr 56 // load arguments into xmm0-xmm7 while \begin_ptr != \end_ptr 59 subq $8, \begin_ptr [all …]
|
| /arkcompiler/ets_runtime/ecmascript/base/ |
| D | bit_helper.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 50 *buffer = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(*buffer) + result->Size()); in ReadBufferInSize() 63 return sizeof(T) * 8; in CountLeadingZeros() 69 return __builtin_clz(static_cast<uint32_t>(value)) - (32 - std::numeric_limits<T>::digits); in CountLeadingZeros() 101 return sizeof(T) * 8; in CountTrailingZeros() 129 /// isMask_64 - This function returns true if the argument is a non-empty 130 /// sequence of ones starting at the least significant bit with the remainder 131 /// zero (64 bit version). 137 /// isShiftedMask_64 - This function returns true if the argument contains a 138 /// non-empty sequence of ones with the remainder zero (64 bit version.) [all …]
|
| /arkcompiler/runtime_core/runtime/mem/gc/ |
| D | bitmap.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 55 static const size_t BITSPERBYTE = 8; 62 * \brief Set the bit indexed by bit_offset. 63 * @param bit_offset - index of the bit to set. 72 * \brief Clear the bit indexed by bit_offset. 73 * @param bit_offset - index of the bit to clear. 82 * \brief Test the bit indexed by bit_offset. 83 * @param bit_offset - index of the bit to test. 84 * @return Returns value of indexed bit. [all …]
|
| /arkcompiler/runtime_core/libpandabase/tests/ |
| D | regmask_test.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 29 …ASSERT_EQ(mask.GetMaxRegister(), base.size() - Clz(static_cast<RegMask::ValueType>(base.to_ulong()… in CompareWithBitset() 61 void TestDistance(RegMask mask, size_t bit, size_t bits_before, size_t bits_after) in TestDistance() argument 63 ASSERT_EQ(mask.GetDistanceFromTail(bit), bits_before); in TestDistance() 64 ASSERT_EQ(mask.GetDistanceFromHead(bit), bits_after); in TestDistance() 70 TestRegMask(MakeMask(1, 4, 8, 3, 24, 28, 30));
|
| D | hash_test.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 69 std::cout << "Failed 32bit key hash on seed = 0x" << std::hex << seed_ << std::endl; in OneObject32bitsHashTest() 77 std::cout << "Failed 32bit key hash on seed = 0x" << std::hex << seed_ << std::endl; in OneObject32bitsHashTest() 86 std::cout << "Failed 32bit key hash on seed = 0x" << std::hex << seed_ << std::endl; in OneObject32bitsHashTest() 126 …reinterpret_cast<char *>((reinterpret_cast<uintptr_t>(mem) + PAGE_SIZE) - sizeof(char) * string_si… in EndOfPageStringHashTest() 131 uint32_t second_hash = T::GetHash32(mutf8_string, string_size - 1); in EndOfPageStringHashTest() 139 // Do it for 8 bits key, 32 bits and 40 bits key.
|
| /arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
| D | builtins_bigint_test.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 44 // for consistency requirement, use ohos_icu4j/data as icu-data-path in SetUp() 49 instance->SetEnableForceGC(true); in SetUp() 51 thread = instance->GetJSThread(); in SetUp() 70 ecmaRuntimeCallInfo->SetFunction(JSTaggedValue::Undefined()); in HWTEST_F_L0() 71 ecmaRuntimeCallInfo->SetThis(JSTaggedValue::Undefined()); in HWTEST_F_L0() 72 ecmaRuntimeCallInfo->SetCallArg(0, numericValue.GetTaggedValue()); in HWTEST_F_L0() 84 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 85 JSHandle<JSTaggedValue> numericValue(factory->NewFromASCII("456")); in HWTEST_F_L0() 88 ecmaRuntimeCallInfo->SetFunction(JSTaggedValue::Undefined()); in HWTEST_F_L0() [all …]
|
| /arkcompiler/runtime_core/runtime/bridge/arch/aarch64/ |
| D | interpreter_to_compiled_code_bridge_aarch64.S | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 31 ldp d1, d0, [\begin_ptr, #-16]! 32 ldp d3, d2, [\begin_ptr, #-16]! 33 ldp d5, d4, [\begin_ptr, #-16]! 34 ldp d7, d6, [\begin_ptr, #-16]! 44 cmp w2, #(SHORTY_NUM_FLOAT_TYPES - 1) 48 // TODO(audovichenko) can we compare with SP? It should simplify code a bit 53 str \arg_reg, [\gpr_ptr], #8 55 cmp w2, #(SHORTY_TAGGED - SHORTY_FIRST_FLOAT) [all …]
|
| /arkcompiler/runtime_core/runtime/mem/ |
| D | runslots.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 36 static constexpr size_t RUNSLOTS_ALIGNMENT_MASK = (1UL << RUNSLOTS_ALIGNMENT) - 1; 200 for (size_t bit = 0; bit < (1U << BITS_IN_BYTE_POWER_OF_TWO); bit++) { in IterateOverOccupiedSlots() local 202 … object_visitor(static_cast<ObjectHeader *>(static_cast<void *>(BitMapToSlot(array_index, bit)))); in IterateOverOccupiedSlots() 241 SLOT_256_BYTES_POWER_OF_TWO = 8, 274 FreeSlot *BitMapToSlot(size_t array_index, size_t bit); 299 …uint16_t first_uninitialized_slot_offset_ {0}; // If equal to zero - we don't have uninitialized …
|
| /arkcompiler/ets_runtime/ecmascript/compiler/assembler/aarch64/ |
| D | assembler_aarch64.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 31 … ((width != RegXSize) && (((imm >> width) != 0) || (imm == (~0ULL >> (RegXSize - width)))))) { in Create() 39 uint64_t mask = (1ULL << size) - 1; in Create() 50 uint64_t mask = ((uint64_t)-1LL) >> (RegXSize - size); in Create() 64 i = static_cast<uint32_t>(RegXSize) - clo; in Create() 65 cto = clo + CountTrailingOnes64(imm) - (static_cast<uint32_t>(RegXSize) - size); in Create() 72 unsigned immr = (size - i) & (size - 1); in Create() 74 // If size has a 1 in the n'th bit, create a value that has zeroes in in Create() 76 uint64_t nImms = ~(size - 1) << 1; in Create() 78 // Or the CTO value into the low bits, which must be below the Nth bit in Create() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/mem/ |
| D | gc_bitset.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 24 // |----word(32 bit)----|----word(32 bit)----|----...----|----word(32 bit)----|----word(32 bit)----| 25 // |---------------------------------------GCBitset(4 kb)------------------------------------------| 35 static constexpr uint32_t BIT_PER_BYTE = 8; 39 static constexpr uint32_t BIT_PER_WORD_MASK = BIT_PER_WORD - 1; 101 uint32_t endIndex = Index(offsetEnd - 1); in ClearBitRange() 102 uint32_t endIndexMask = Mask(IndexInWord(offsetEnd - 1)); in ClearBitRange() 105 ClearWord<mode>(startIndex, ~(startIndexMask - 1)); in ClearBitRange() 106 ClearWord<mode>(endIndex, endIndexMask | (endIndexMask - 1)); in ClearBitRange() 111 ClearWord<mode>(endIndex, endIndexMask | (endIndexMask - startIndexMask)); in ClearBitRange() [all …]
|
| /arkcompiler/runtime_core/libpandafile/ |
| D | pandafile_isapi.rb | 1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 33 jump? && conditional? && stripped_mnemonic[-1] != 'z' 37 jump? && conditional? && stripped_mnemonic[-1] == 'z' 43 instance_variables.map { |v| [v.to_s[1..-1], instance_variable_get(v)] }.to_h 48 (bits + 7) / 8 * 8 56 # name - name of variable in emitter code 57 # type - type of variable in emitter code 58 # width - bit width 59 # tag - the same as in Operand isapi class
|