https://sourceware.org/bugzilla/show_bug.cgi?id=20046
Bug ID: 20046 Summary: x86 feature request: build an instruction including rex and modr/m Product: binutils Version: 2.27 (HEAD) Status: NEW Severity: enhancement Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: hpa at zytor dot com Target Milestone: --- In the Linux kernel, we constantly bump into the problem that we need to use new instructions, but that backwards versions of gas which we still need to handle don't support them. For plain instructions, it is fine to use .byte, but it gets very suboptimal when the instructions takes registers or memory operands. I'm wondering if something like this might make sense: .rex[/w] <r>,<m> .modrm <r>,<m> ... which would generate the REX and modr/m (+SIB, displacement etc needed for the addressing mode) bytes for an instruction with the given r and m operands. r might be an integer immediate for cases where the register operand is used as an opcode extension. This would allow a gcc inline of the form: asm(".byte 0xf3 ; .rex/w %0,%1 ; .byte 0x0f, 0x99 ; .modrm %0,%1" : "=rm" (...) : "r" (...)); ... for some random new instruction with the SDM description F3 0F 99 /r. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils