I am doing some research into x86 assemblers, and came across this wikipedia article.
It notes that Intel syntax assemblers infer the width of the instruction/operand from the register width.
AT&T syntax assembly mnemonics postfix a letter to the "base" mnemonic to specify the operand width. As with the Intel syntax, the register width can still be specified by the register name.
For example the ax register is 16 bits wide, the eax register is 32 bits wide.
In Intel syntax, the mov instruction width is inferred from the width of the register.
In AT&T, movl is an instruction which operates on 32 bit wide data, mov (?) operates on 16 bit wide data. (At least this is my guess - I have not written anything in AT&T before.)
My question is, what happens if the register and operator width differ, in an AT&T syntax assembly code, and one attempts to compile it? Does the operator width take precedence, or is this simply an error, and the assembly code will not assemble?