• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ECMASCRIPT_COECMASCRIPT_COMPILER_ASSEMBLER_RELOC_REWRITER_AARCH64_RELOC_REWRITER_H
17 #define ECMASCRIPT_COECMASCRIPT_COMPILER_ASSEMBLER_RELOC_REWRITER_AARCH64_RELOC_REWRITER_H
18 
19 #include "ecmascript/ecma_vm.h"
20 #include "ecmascript/mem/native_area_allocator.h"
21 #include "ecmascript/jit/rewriter/reloc_rewriter.h"
22 
23 namespace panda::ecmascript::kungfu {
24 
25 class PUBLIC_API RelocWriterAArch64 : public RelocWriter {
26     static const int INSTRUCT_SIZE = 4;
27     static const int MAX_JUMP_SIZE = 128 * 1024 * 1024;
28     public:
29         bool PUBLIC_API RewriteRelocInfo(uint8_t *codeAddr, uint8_t *jitAllocAddr, RelocMap &relocInfo);
30         virtual ~RelocWriterAArch64() = default;
31 };
32 
33 }  // namespace panda::ecmascript::kungfu
34 #endif  // ECMASCRIPT_COECMASCRIPT_COMPILER_ASSEMBLER_RELOC_REWRITER_AARCH64_RELOC_REWRITER_H