Ticket #18 (closed defect: fixed)
LEA does not support constant expressions exceeding 32-bits
| Reported by: | jlawson-yasm@… | Owned by: | peter@… |
|---|---|---|---|
| Priority: | P2 | Milestone: | 0.3.0 |
| Component: | Architecture: x86 | Version: | other |
| Severity: | normal | Keywords: | |
| Cc: | peter@… |
Description
NASM allows use of "LEA" expressions that exceed 32-bits and silently wraps them for you. YASM gives an error and refuses to compile when this is done. In NASM, this works but YASM this fails with "invalid effective address": %define P 0xB7E15163 %define Q 0x9E3779B9 lea eax,[eax+P+Q] Normally YASM seems to try to give a warning for many other types of instructions (mov, add, sub, ...). For example, in NASM this compiles without warning, but YASM kindly prints out "warning: value does not fit in 32 bit field" which is good. %define P 0xB7E15163 %define Q 0x9E3779B9 add eax,P+Q YASM should be consistent and allow the LEA with large constants, but give a warning if it wants to.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
