diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-05-30 20:30:15 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-05-30 20:30:15 +0000 |
commit | c6be66fa2088ad68f4072ca001a192c6ea095f0d (patch) | |
tree | 4c199e48cd6553d4a84e802e9b7137927d0a8676 /assemble.c | |
parent | ff69805feb73c457471f7f411fcc3509e1fe0491 (diff) | |
download | nasm-c6be66fa2088ad68f4072ca001a192c6ea095f0d.tar.gz nasm-c6be66fa2088ad68f4072ca001a192c6ea095f0d.tar.bz2 nasm-c6be66fa2088ad68f4072ca001a192c6ea095f0d.zip |
Correct the generation of 67 prefixes.
The recent switch from register numbers (with -1 meaning "none") to
register flags (with 0 meaning "none") broke the generation of 67
prefixes, especially in 64-bit mode.
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1960,20 +1960,20 @@ static int chsize(operand * input, int addrbits) if (input->indexreg < EXPR_REG_START /* Verify as Register */ || input->indexreg >= REG_ENUM_LIMIT) - i = -1; + i = 0; else i = reg_flags[input->indexreg]; if (input->basereg < EXPR_REG_START /* Verify as Register */ || input->basereg >= REG_ENUM_LIMIT) - b = -1; + b = 0; else b = reg_flags[input->basereg]; if (input->scale == 0) - i = -1; + i = 0; - if (i == -1 && b == -1) /* pure offset */ + if (!i && !b) /* pure offset */ return (input->addr_size != 0 && input->addr_size != addrbits); if (!(REG32 & ~i) || !(REG32 & ~b)) |