Ticket #307 (new enhancement)

Opened 7 months ago

Last modified 7 months ago

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

Reported by: rme Assigned to: rme
Priority: minor Milestone: IA-32 port
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

06/07/08 23:23:34 changed 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).