Skip to contentSkip to conversation

Change x86 prefix order

DISCUSSION H. J. Lu 2 participants 3 messages Dec 6, 2006

lore
Share & tools
lore

H. J. Lu

author
#0 lore raw

On x86, the order of prefix SEG_PREFIX, ADDR_PREFIX, DATA_PREFIX and LOCKREP_PREFIX isn't fixed. Currently, gas generates

LOCKREP_PREFIX ADDR_PREFIX DATA_PREFIX SEG_PREFIX

I will check in a patch:

http://sourceware.org/ml/binutils/2006-12/msg00054.html

tomorrow and change gas to generate

SEG_PREFIX ADDR_PREFIX DATA_PREFIX LOCKREP_PREFIX

H.J.

#1 lore raw
Quoted 5 lines · On Tue, 5 Dec 2006 23:00:14 -0800 H. J. Lu wrote:

On x86, the order of prefix SEG_PREFIX, ADDR_PREFIX, DATA_PREFIX and LOCKREP_PREFIX isn't fixed. Currently, gas generates

LOCKREP_PREFIX ADDR_PREFIX DATA_PREFIX SEG_PREFIX

Quoted 7 lines

I will check in a patch:

http://sourceware.org/ml/binutils/2006-12/msg00054.html

tomorrow and change gas to generate

SEG_PREFIX ADDR_PREFIX DATA_PREFIX LOCKREP_PREFIX

Hi,
Could you provide a "why" for this in addition to the "what", please?

---
~Randy

author
#2 lore raw
Quoted 11 lines · Randy Dunlap
Quoted 9 lines · On Tue, 5 Dec 2006 23:00:14 -0800 H. J. Lu wrote:

On x86, the order of prefix SEG_PREFIX, ADDR_PREFIX, DATA_PREFIX and LOCKREP_PREFIX isn't fixed. Currently, gas generates

LOCKREP_PREFIX ADDR_PREFIX DATA_PREFIX SEG_PREFIX

I will check in a patch:

http://sourceware.org/ml/binutils/2006-12/msg00054.html

Quoted 7 lines
Quoted 3 lines

tomorrow and change gas to generate

SEG_PREFIX ADDR_PREFIX DATA_PREFIX LOCKREP_PREFIX

Hi,
Could you provide a "why" for this in addition to the "what", please?

LOCKREP_PREFIX is also used as SIMD prefix. DATA_PREFIX can be used as either SIMD prefix or data size prefix for SIMD instructions. The new order

SEG_PREFIX ADDR_PREFIX DATA_PREFIX LOCKREP_PREFIX

will make SIMD prefixes close to SIMD opcode.

H.J.