Opened 11 years ago

Last modified 11 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:

Description

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) (% temp1.bh))	;aka %dh

Change History (1)

comment:1 Changed 11 years ago by rme

LAP actually signals an error in a case like this:

(defx8632lapfunction use-addb ()
       (addb ($ x8632::subtag-character) (%b esi))
       (single-value-return))
> 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.