diff options
author | Charles Crayne <chuck@thor.crayne.org> | 2008-09-30 16:11:32 -0700 |
---|---|---|
committer | Charles Crayne <chuck@thor.crayne.org> | 2008-09-30 16:11:32 -0700 |
commit | f1aefd8456b0d32d36a283cc6d12b3a09ae8fdb5 (patch) | |
tree | 094c3c6d4bb022de0cd56be0c407295a7fd375cf /assemble.c | |
parent | 3cc245994427cb7f22577c5a343fe4ea581991a5 (diff) | |
download | nasm-f1aefd8456b0d32d36a283cc6d12b3a09ae8fdb5.tar.gz nasm-f1aefd8456b0d32d36a283cc6d12b3a09ae8fdb5.tar.bz2 nasm-f1aefd8456b0d32d36a283cc6d12b3a09ae8fdb5.zip |
Change behavior of -O0 and -O1 for backward compatibility
-O0: JMP default to NEAR, Jcc/LOOP/JCXZ default to SHORT.
In other words, this is reverting to full-blown 0.98 behavior, not
0.98.39.
-O1: JMP and Jcc default to NEAR, LOOP/JCXZ default to SHORT (only
possible form).
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -247,9 +247,13 @@ static int jmp_match(int32_t segment, int64_t offset, int bits, int64_t isize; uint8_t c = code[0]; - if (c != 0370 && c != 0371) + if ((c != 0370 && c != 0371) || (ins->oprs[0].type & STRICT)) return 0; - if ((optimizing <= 0 || (ins->oprs[0].type & STRICT))) + if (optimizing == 0) + { + return 0; + } + if (optimizing < 0 && c == 0371 ) { return 0; } |