]> granicus.if.org Git - yasm/commitdiff
* x86bc.c (x86_bc_insn_resolve): When handling shift_op, change immlen
authorPeter Johnson <peter@tortall.net>
Sun, 25 Sep 2005 00:15:17 +0000 (00:15 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 25 Sep 2005 00:15:17 +0000 (00:15 -0000)
rather than munging bc->len directly.

svn path=/trunk/yasm/; revision=1229

modules/arch/x86/x86bc.c

index 5fbd7910da8ae7bb06c7e6542151435b3f97d3b6..c35274e9c883ed11704d840ddc79e72e87f014e7 100644 (file)
@@ -598,10 +598,8 @@ x86_bc_insn_resolve(yasm_bytecode *bc, int save,
            if (insn->shift_op && temp &&
                (num = yasm_expr_get_intnum(&temp, calc_bc_dist))) {
                if (num && yasm_intnum_get_uint(num) == 1) {
-                   /* We can use the ,1 form: subtract out the imm len
-                    * (as we add it back in below).
-                    */
-                   bc->len -= imm->len;
+                   /* We can use the ,1 form: no immediate (set to 0 len) */
+                   immlen = 0;
 
                    if (save) {
                        /* Make the ,1 form permanent. */