This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR gas/1874: mwait/monitor don't work in 64bit


>-{"monitor",   3, 0x0f01, 0xc8, CpuPNI, NoSuf|ImmExt,	{ Reg32, Reg32,
Reg32} },
>+{"monitor",   3, 0x0f01, 0xc8, CpuPNI|CpuNo64, NoSuf|ImmExt,	{ Reg32,
Reg32, Reg32 } },
>+/* Need to ensure only "monitor %rax,%ecx,%edx" is accepted. */
>+{"monitor",   3, 0x0f01, 0xc8, CpuPNI|Cpu64,
NoSuf|ImmExt|NoRex64,	{ Reg64, Reg32, Reg32 } },

I'm afraid this isn't correct. While it took your Premier Support folks
several months to come up with an obviously wrong answer (experiments
show that the first operand's size is determined by the address size in
effect), they still didn't manage to get me a correct answer. However,
as already said, the operand size is controlled by the address size (and
thus without prefixes, and hence implicitly also without operands)
everything is correct, the 32-bit first-operand-form is still valid (and
thus shouldn't be disallowed).

When I did these experiments, the mere fact that expressing this in
gas'/opcodes' terms isn't obvious (and I didn't have a lot of time to
spend on this) kept me from submitting a patch to obtain correct (that
is, matching reality short of having a proper specification) behavior.

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]