]> granicus.if.org Git - yasm/commit
Make manual size overrides on effective addresses only work if legal;
authorPeter Johnson <peter@tortall.net>
Thu, 14 Oct 2004 07:46:44 +0000 (07:46 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 14 Oct 2004 07:46:44 +0000 (07:46 -0000)
commit0bca1b1b91e1d5daf72fc91401f92355ab1e8c0f
tree79eb39e9a673c3551d3e9e1979c6173981bd98b9
parent74cfd6a7a694f722a494f45b05b746b635fadd6c
Make manual size overrides on effective addresses only work if legal;
otherwise the override is ignored and a warning is output, so correct
code is always generated.

Reported by: vclaudepierre@tiscali.fr
Bugzilla Bug: 40

* x86expr.c (x86_checkea_calc_displen): Output warnings for noreg case;
reorder such that displacement length calculation is done if the warning
is output.
* x86bc.c (x86_bc_insn_resolve): If length was forced but checkea had to
override it, save it always (to avoid multiple warnings).

* addrop.hex: Match corrected code generation.
* addrop.errwarn: Include new warning message.

* ea-warn.asm, ea-warn.errwarn, ea-warn.hex: Test new functionality more
in depth (code thanks to bug reporter).

svn path=/trunk/yasm/; revision=1165
modules/arch/x86/tests/Makefile.inc
modules/arch/x86/tests/addrop.errwarn
modules/arch/x86/tests/addrop.hex
modules/arch/x86/tests/ea-warn.asm [new file with mode: 0644]
modules/arch/x86/tests/ea-warn.errwarn [new file with mode: 0644]
modules/arch/x86/tests/ea-warn.hex [new file with mode: 0644]
modules/arch/x86/x86bc.c
modules/arch/x86/x86expr.c