Opened 13 years ago

Last modified 13 years ago

#307 new enhancement

x86 assembler should warn about using byte insns with non-byte regs

Reported by: rme Owned by: rme
Priority: minor Milestone:
Component: Compiler Version:
Keywords: Cc:


It would be helpful if the x86 assembler (in 32-bit mode) would warn when we try to use a register that is normally not byte-accessible as a byte register. As it stands now, an instruction will assemble, but will refer to a high byte register.

For example, if dest is %esi, this

(addb (:$b x8632::subtag-character) (:%b dest)))

assembles as

(addb ($ 75) (%	;aka %dh

Change History (1)

comment:1 Changed 13 years ago by rme

LAP actually signals an error in a case like this:

(defx8632lapfunction use-addb ()
       (addb ($ x8632::subtag-character) (%b esi))
> Error: Designator %B can't be used with register esi
> While executing: LOOKUP-X86-REGISTER, in process listener(1).
Note: See TracTickets for help on using tickets.