blob: 9d27b8754690e33792ed19b216ef5e1b98137f60 [file] [log] [blame]
Alexey Frunze19f6c692016-11-30 19:19:55 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Vladimir Marko6d66fcf2018-04-12 13:15:27 +010017#ifndef ART_DEX2OAT_LINKER_MIPS64_RELATIVE_PATCHER_MIPS64_H_
18#define ART_DEX2OAT_LINKER_MIPS64_RELATIVE_PATCHER_MIPS64_H_
Alexey Frunze19f6c692016-11-30 19:19:55 -080019
20#include "linker/relative_patcher.h"
21
22namespace art {
23namespace linker {
24
Roland Levillainbbc6e7e2018-08-24 16:58:47 +010025class Mips64RelativePatcher final : public RelativePatcher {
Alexey Frunze19f6c692016-11-30 19:19:55 -080026 public:
Igor Murashkin2ffb7032017-11-08 13:35:21 -080027 Mips64RelativePatcher() {}
Alexey Frunze19f6c692016-11-30 19:19:55 -080028
29 uint32_t ReserveSpace(uint32_t offset,
30 const CompiledMethod* compiled_method,
Roland Levillainbbc6e7e2018-08-24 16:58:47 +010031 MethodReference method_ref) override;
32 uint32_t ReserveSpaceEnd(uint32_t offset) override;
33 uint32_t WriteThunks(OutputStream* out, uint32_t offset) override;
Alexey Frunze19f6c692016-11-30 19:19:55 -080034 void PatchCall(std::vector<uint8_t>* code,
35 uint32_t literal_offset,
36 uint32_t patch_offset,
Roland Levillainbbc6e7e2018-08-24 16:58:47 +010037 uint32_t target_offset) override;
Alexey Frunze19f6c692016-11-30 19:19:55 -080038 void PatchPcRelativeReference(std::vector<uint8_t>* code,
39 const LinkerPatch& patch,
40 uint32_t patch_offset,
Roland Levillainbbc6e7e2018-08-24 16:58:47 +010041 uint32_t target_offset) override;
Vladimir Markof6675082019-05-17 12:05:28 +010042 void PatchEntrypointCall(std::vector<uint8_t>* code,
43 const LinkerPatch& patch,
44 uint32_t patch_offset) override;
Vladimir Markof4f2daa2017-03-20 18:26:59 +000045 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
46 const LinkerPatch& patch,
Roland Levillainbbc6e7e2018-08-24 16:58:47 +010047 uint32_t patch_offset) override;
48 std::vector<debug::MethodDebugInfo> GenerateThunkDebugInfo(uint32_t executable_offset) override;
Alexey Frunze19f6c692016-11-30 19:19:55 -080049
50 private:
51 DISALLOW_COPY_AND_ASSIGN(Mips64RelativePatcher);
52};
53
54} // namespace linker
55} // namespace art
56
Vladimir Marko6d66fcf2018-04-12 13:15:27 +010057#endif // ART_DEX2OAT_LINKER_MIPS64_RELATIVE_PATCHER_MIPS64_H_