blob: 8ef8cebe2fc91eeb0586a06a424bb8d7f3f9404c [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
17#ifndef ART_COMPILER_LINKER_MIPS64_RELATIVE_PATCHER_MIPS64_H_
18#define ART_COMPILER_LINKER_MIPS64_RELATIVE_PATCHER_MIPS64_H_
19
20#include "linker/relative_patcher.h"
21
22namespace art {
23namespace linker {
24
25class Mips64RelativePatcher FINAL : public RelativePatcher {
26 public:
27 explicit Mips64RelativePatcher() {}
28
29 uint32_t ReserveSpace(uint32_t offset,
30 const CompiledMethod* compiled_method,
31 MethodReference method_ref) OVERRIDE;
32 uint32_t ReserveSpaceEnd(uint32_t offset) OVERRIDE;
33 uint32_t WriteThunks(OutputStream* out, uint32_t offset) OVERRIDE;
34 void PatchCall(std::vector<uint8_t>* code,
35 uint32_t literal_offset,
36 uint32_t patch_offset,
37 uint32_t target_offset) OVERRIDE;
38 void PatchPcRelativeReference(std::vector<uint8_t>* code,
39 const LinkerPatch& patch,
40 uint32_t patch_offset,
41 uint32_t target_offset) OVERRIDE;
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(Mips64RelativePatcher);
45};
46
47} // namespace linker
48} // namespace art
49
50#endif // ART_COMPILER_LINKER_MIPS64_RELATIVE_PATCHER_MIPS64_H_