Mail Archives: djgpp-workers/2001/03/03/15:31:13
Bill, Eli,
Just to review and make sure we are on the same page....
Bill, you initially implemented sh[lr]d in `stock' djasm.y for
the following double-precision shifts:
sh[lr]d reg16, reg16, const
sh[lr]d reg16, reg16, reg8
sh[lr]d reg32, reg32, const
sh[lr]d reg32, reg32, reg8
(This is only half of the available double-precision shifts,
but these are the only ones you implemented.)
Then, you later (in your hacked version of djasm.y, never distributed
with DJGPP) redefined sh[lr]d to be consistent with the other mnemonics,
introduced new mnemonics for the double-precision shift operations, and
implemented all 8 forms of the instruction.
Now, in the patch to be applied *after* the one we are discussing,
you have implemented a trap for the following mnemonic usage
| SHIFTD REG16 ',' REG16 ',' const { shld_error($1,0); }
| SHIFTD REG16 ',' REG16 ',' REG8 { shld_error($1,0); }
| SHIFTD regmem ',' REG16 ',' const { shld_error($1,0); }
| SHIFTD regmem ',' REG16 ',' REG8 { shld_error($1,0); }
| SHIFTD REG32 ',' REG32 ',' const { shld_error($1,1); }
| SHIFTD REG32 ',' REG32 ',' REG8 { shld_error($1,1); }
| SHIFTD regmem ',' REG32 ',' const { shld_error($1,1); }
| SHIFTD regmem ',' REG32 ',' REG8 { shld_error($1,1); }
so that any obsolete usage of sh[lr]d as a double-precision instruction
will be flagged and the correct mnemonic will be indicated.
If this is all correct, then IMHO we should proceed with the next two
patches to djasm, and add notes to wc204.txi and djasm.txi. I don't
see how we can (easily) do any better than this.
--
jtw
3:47 E.S.T.
- Raw text -