[llvm-dev] [X86] Adding a new instruction JUMPB

Dean Michael Berris via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 28 02:12:13 PDT 2016


> On 28 Jul 2016, at 04:30, Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Personally, I think we should add this. I've personally been annoyed that it is difficult to convince gas to use the short jump encoding. If you use just the right kinds of labels, it uses the short encoding, but apparently because of -mc-relax-all, that won't actually work with clang either. It's all quite complicated, and we should just expose a simple way for the user to ask for what they want.
> 

Yes, -mrelax-all is the problem from clang (and I suppose if llvm-lc was used with -relax-all).

> Assuming we go with this, I propose we use the mneumonic "jmpb". It seems consistent with gas's size suffixes, but I'm open to other ideas.
> 

jmpb sounds good to me. :)

> Normal (non-xray) ISel should never produce this instruction, so we don't need any SDAG patterns for it. You should be able to look at existing rare x86 instructions that don't have SDAG nodes, like PUSHF, SAHF, CPUID, etc to see the minimal amount of tablegen you need to add.
> 

Cool, thanks. I'll prepare something if I don't hear any dissent in the next couple of days.

Cheers


More information about the llvm-dev mailing list