Rafael Espíndola via llvm-dev
2016-Jun-29 02:17 UTC
[llvm-dev] x86: How to Force 2-byte `jmp` instruction in lowering
On 28 June 2016 at 22:14, Dean Michael Berris <dberris at google.com> wrote:> On Wed, Jun 29, 2016 at 12:06 PM Rafael Espíndola > <rafael.espindola at gmail.com> wrote: >> >> On 22 June 2016 at 16:36, Dean Michael Berris via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >> > Peter suggested just writing out '.byte 0xeb, 0x09' and that allowed the >> > jump instruction to bypass the relaxation, so that fixes my immediate >> > problem. The question still stands though whether it should be possible >> > to >> > do through the instruction builder interface. >> > >> >> I don't think so. When the relax-all flag is on MC will relax all >> instructions. >> > > I see. > > So the question becomes what's the advantage (if any) of Clang passing the > 'relax-all' flag down to MC? Is there a good reason for this behaviour at > all?Speed, but it has probably been years since anyone benchmarked that. Cheers, Rafael
Dean Michael Berris via llvm-dev
2016-Jun-29 06:49 UTC
[llvm-dev] x86: How to Force 2-byte `jmp` instruction in lowering
On Wed, Jun 29, 2016 at 12:17 PM Rafael Espíndola < rafael.espindola at gmail.com> wrote:> On 28 June 2016 at 22:14, Dean Michael Berris <dberris at google.com> wrote: > > On Wed, Jun 29, 2016 at 12:06 PM Rafael Espíndola > > <rafael.espindola at gmail.com> wrote: > >> > >> On 22 June 2016 at 16:36, Dean Michael Berris via llvm-dev > >> <llvm-dev at lists.llvm.org> wrote: > >> > Peter suggested just writing out '.byte 0xeb, 0x09' and that allowed > the > >> > jump instruction to bypass the relaxation, so that fixes my immediate > >> > problem. The question still stands though whether it should be > possible > >> > to > >> > do through the instruction builder interface. > >> > > >> > >> I don't think so. When the relax-all flag is on MC will relax all > >> instructions. > >> > > > > I see. > > > > So the question becomes what's the advantage (if any) of Clang passing > the > > 'relax-all' flag down to MC? Is there a good reason for this behaviour at > > all? > > Speed, but it has probably been years since anyone benchmarked that. > >Okay. Any objections to just removing that from the clang side? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160629/2dcc049d/attachment.html>
Rafael Espíndola via llvm-dev
2016-Jun-29 14:38 UTC
[llvm-dev] x86: How to Force 2-byte `jmp` instruction in lowering
On 29 June 2016 at 02:49, Dean Michael Berris <dberris at google.com> wrote:> On Wed, Jun 29, 2016 at 12:17 PM Rafael Espíndola > <rafael.espindola at gmail.com> wrote: >> >> On 28 June 2016 at 22:14, Dean Michael Berris <dberris at google.com> wrote: >> > On Wed, Jun 29, 2016 at 12:06 PM Rafael Espíndola >> > <rafael.espindola at gmail.com> wrote: >> >> >> >> On 22 June 2016 at 16:36, Dean Michael Berris via llvm-dev >> >> <llvm-dev at lists.llvm.org> wrote: >> >> > Peter suggested just writing out '.byte 0xeb, 0x09' and that allowed >> >> > the >> >> > jump instruction to bypass the relaxation, so that fixes my immediate >> >> > problem. The question still stands though whether it should be >> >> > possible >> >> > to >> >> > do through the instruction builder interface. >> >> > >> >> >> >> I don't think so. When the relax-all flag is on MC will relax all >> >> instructions. >> >> >> > >> > I see. >> > >> > So the question becomes what's the advantage (if any) of Clang passing >> > the >> > 'relax-all' flag down to MC? Is there a good reason for this behaviour >> > at >> > all? >> >> Speed, but it has probably been years since anyone benchmarked that. >> > > Okay. Any objections to just removing that from the clang side?Depends on what the benchmarks show. Cheers, Rafael
Reasonably Related Threads
- x86: How to Force 2-byte `jmp` instruction in lowering
- x86: How to Force 2-byte `jmp` instruction in lowering
- x86: How to Force 2-byte `jmp` instruction in lowering
- x86: How to Force 2-byte `jmp` instruction in lowering
- x86: How to Force 2-byte `jmp` instruction in lowering