EXTRA_DIST += modules/arch/x86/tests/simd64-1.hex
EXTRA_DIST += modules/arch/x86/tests/simd64-2.asm
EXTRA_DIST += modules/arch/x86/tests/simd64-2.hex
+EXTRA_DIST += modules/arch/x86/tests/sse-prefix.asm
+EXTRA_DIST += modules/arch/x86/tests/sse-prefix.hex
EXTRA_DIST += modules/arch/x86/tests/sse3.asm
EXTRA_DIST += modules/arch/x86/tests/sse3.hex
EXTRA_DIST += modules/arch/x86/tests/sse4.asm
--- /dev/null
+[bits 32]
+movsw
+es movsw
+rep movsw
+rep fs movsw
+fs rep movsw
+
+movsd
+es movsd
+rep movsd
+rep fs movsd
+fs rep movsd
+
+cmpss xmm0, [eax], 0
+cmpss xmm0, [es:eax], 0
+
+cmpsd
+fs cmpsd
+rep fs cmpsd
+fs rep cmpsd
+
+cmpsd xmm0, [eax], 0
+cmpsd xmm0, [es:eax], 0
+
+[bits 64]
+movsw
+rep movsw
+
+movsd
+rep movsd
+
+cmpss xmm0, [r8], 0
+
+cmpsd
+rep cmpsd
+
+cmpsd xmm0, [r8], 0
+
+
--- /dev/null
+66
+a5
+66
+26
+a5
+f3
+66
+a5
+f3
+66
+64
+a5
+f3
+66
+64
+a5
+a5
+26
+a5
+f3
+a5
+f3
+64
+a5
+f3
+64
+a5
+f3
+0f
+c2
+00
+00
+26
+f3
+0f
+c2
+00
+00
+a7
+64
+a7
+f3
+64
+a7
+f3
+64
+a7
+f2
+0f
+c2
+00
+00
+26
+f2
+0f
+c2
+00
+00
+66
+a5
+f3
+66
+a5
+a5
+f3
+a5
+f3
+41
+0f
+c2
+00
+00
+a7
+f3
+a7
+f2
+41
+0f
+c2
+00
+00
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
1c
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
1d
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
1e
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
08
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
09
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
0a
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
01
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
03
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
02
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
05
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
07
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
06
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
0b
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
04
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
38
00
c1
-f3
67
+f3
0f
7f
02
44
24
08
-f3
67
+f3
0f
6f
02
-f3
67
+f3
0f
6f
08
0f
c1
03
-f3
67
+f3
0f
7f
02
aa
26
ab
-64
66
+64
ab
65
a4
unsigned char *bufp_orig = *bufp;
/* Prefixes */
- if (insn->special_prefix != 0)
- YASM_WRITE_8(*bufp, insn->special_prefix);
x86_common_tobytes(&insn->common, bufp,
x86_ea ? (x86_ea->ea.segreg>>8) : 0);
+ if (insn->special_prefix != 0)
+ YASM_WRITE_8(*bufp, insn->special_prefix);
if (insn->rex != 0xff) {
if (insn->common.mode_bits == 64 && insn->common.opersize == 64 &&
insn->def_opersize_64 != 64)
yasm_warn_set(YASM_WARN_GENERAL,
N_("multiple segment overrides, using leftmost"));
insn->special_prefix = segregs[num_segregs-1]>>8;
- }
+ } else if (num_segregs > 0)
+ yasm_internal_error(N_("unhandled segment prefix"));
+
if (imm) {
insn->imm = yasm_imm_create_expr(imm);
insn->imm->val.size = im_len;