[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/20046] New: x86 feature request: build an instruction including
From: |
hpa at zytor dot com |
Subject: |
[Bug gas/20046] New: x86 feature request: build an instruction including rex and modr/m |
Date: |
Wed, 04 May 2016 21:19:50 +0000 |
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 gas/20046] New: x86 feature request: build an instruction including rex and modr/m,
hpa at zytor dot com <=
- [Bug gas/20046] x86 feature request: build an instruction including rex and modr/m, hjl.tools at gmail dot com, 2016/05/04
- [Bug gas/20046] x86 feature request: build an instruction including rex and modr/m, hjl.tools at gmail dot com, 2016/05/05
- [Bug gas/20046] x86 feature request: build an instruction including rex and modr/m, hjl.tools at gmail dot com, 2016/05/05
- [Bug gas/20046] x86 feature request: build an instruction including rex and modr/m, hpa at zytor dot com, 2016/05/05
- [Bug gas/20046] x86 feature request: build an instruction including rex and modr/m, hpa at zytor dot com, 2016/05/05
- [Bug gas/20046] x86 feature request: build an instruction including rex and modr/m, hpa at zytor dot com, 2016/05/05