Fix handling of >32 bit NASM character constants; they were being shifted

an extra time.

Bugzilla bug: 25
Reported by: vclaudepierre@tiscali.fr

svn path=/trunk/yasm/; revision=1100
0.4
Peter Johnson 21 years ago
parent a90b9d8906
commit 203a2474ac
  1. 2
      libyasm/intnum.c
  2. 3
      libyasm/tests/Makefile.inc
  3. 3
      libyasm/tests/charconst64.asm
  4. 0
      libyasm/tests/charconst64.errwarn
  5. 10
      libyasm/tests/charconst64.hex

@ -214,9 +214,9 @@ yasm_intnum_create_charconst_nasm(const char *str, unsigned long line)
default:
/* >32 bit conversion */
while (len) {
BitVector_Move_Left(conv_bv, 8);
BitVector_Chunk_Store(conv_bv, 8, 0,
(unsigned long)str[--len]);
BitVector_Move_Left(conv_bv, 8);
}
intn->val.bv = BitVector_Clone(conv_bv);
}

@ -5,6 +5,9 @@ TESTS += floatnum_test
TESTS += libyasm/tests/libyasm_test.sh
EXTRA_DIST += libyasm/tests/libyasm_test.sh
EXTRA_DIST += libyasm/tests/charconst64.asm
EXTRA_DIST += libyasm/tests/charconst64.errwarn
EXTRA_DIST += libyasm/tests/charconst64.hex
EXTRA_DIST += libyasm/tests/duplabel-err.asm
EXTRA_DIST += libyasm/tests/duplabel-err.errwarn
EXTRA_DIST += libyasm/tests/unary.asm

@ -0,0 +1,3 @@
[bits 64]
mov rax, '12345678'

@ -0,0 +1,10 @@
48
b8
31
32
33
34
35
36
37
38
Loading…
Cancel
Save