1b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko/* 2b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * Copyright (C) 2015 The Android Open Source Project 3b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * 4b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * Licensed under the Apache License, Version 2.0 (the "License"); 5b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * you may not use this file except in compliance with the License. 6b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * You may obtain a copy of the License at 7b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * 8b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * http://www.apache.org/licenses/LICENSE-2.0 9b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * 10b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * Unless required by applicable law or agreed to in writing, software 11b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * distributed under the License is distributed on an "AS IS" BASIS, 12b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * See the License for the specific language governing permissions and 14b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko * limitations under the License. 15b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko */ 16b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 17b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko#ifndef ART_COMPILER_LINKER_X86_RELATIVE_PATCHER_X86_H_ 18b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko#define ART_COMPILER_LINKER_X86_RELATIVE_PATCHER_X86_H_ 19b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 20b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko#include "linker/x86/relative_patcher_x86_base.h" 21b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 22b163bb742a099c1808907b513ae39068b63b1692Vladimir Markonamespace art { 23b163bb742a099c1808907b513ae39068b63b1692Vladimir Markonamespace linker { 24b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 25b163bb742a099c1808907b513ae39068b63b1692Vladimir Markoclass X86RelativePatcher FINAL : public X86BaseRelativePatcher { 26b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko public: 27b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko X86RelativePatcher() { } 28b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 29cac5a7e871f1f346b317894359ad06fa7bd67fbaVladimir Marko void PatchPcRelativeReference(std::vector<uint8_t>* code, 30cac5a7e871f1f346b317894359ad06fa7bd67fbaVladimir Marko const LinkerPatch& patch, 31cac5a7e871f1f346b317894359ad06fa7bd67fbaVladimir Marko uint32_t patch_offset, 32cac5a7e871f1f346b317894359ad06fa7bd67fbaVladimir Marko uint32_t target_offset) OVERRIDE; 33f4f2daafb38c9c07ea74044a0fb89a2a19288b7aVladimir Marko void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code, 34f4f2daafb38c9c07ea74044a0fb89a2a19288b7aVladimir Marko const LinkerPatch& patch, 35f4f2daafb38c9c07ea74044a0fb89a2a19288b7aVladimir Marko uint32_t patch_offset) OVERRIDE; 36b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko}; 37b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 38b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko} // namespace linker 39b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko} // namespace art 40b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko 41b163bb742a099c1808907b513ae39068b63b1692Vladimir Marko#endif // ART_COMPILER_LINKER_X86_RELATIVE_PATCHER_X86_H_ 42