|
|
2e4410 |
--- binutils.orig/gas/config/tc-i386.c 2020-08-21 10:21:00.595678097 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/config/tc-i386.c 2020-08-21 10:22:15.009449340 +0100
|
|
|
2e4410 |
@@ -8035,7 +8035,8 @@ output_disp (fragS *insn_start_frag, off
|
|
|
2e4410 |
int size = disp_size (n);
|
|
|
2e4410 |
offsetT val = i.op[n].disps->X_add_number;
|
|
|
2e4410 |
|
|
|
2e4410 |
- val = offset_in_range (val >> i.memshift, size);
|
|
|
2e4410 |
+ val = offset_in_range (val >> (size == 1 ? i.memshift : 0),
|
|
|
2e4410 |
+ size);
|
|
|
2e4410 |
p = frag_more (size);
|
|
|
2e4410 |
md_number_to_chars (p, val, size);
|
|
|
2e4410 |
}
|
|
|
2e4410 |
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2020-08-21 10:21:00.669677873 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/testsuite/gas/i386/i386.exp 2020-08-21 10:39:22.921167674 +0100
|
|
|
2e4410 |
@@ -216,6 +216,7 @@ if [expr ([istarget "i*86-*-*"] || [ist
|
|
|
2e4410 |
run_dump_test "evex-lig512-intel"
|
|
|
2e4410 |
run_dump_test "evex-wig1"
|
|
|
2e4410 |
run_dump_test "evex-wig1-intel"
|
|
|
2e4410 |
+ run_dump_test "evex-no-scale-32"
|
|
|
2e4410 |
run_dump_test "sse2avx"
|
|
|
2e4410 |
run_list_test "inval-avx" "-al"
|
|
|
2e4410 |
run_list_test "inval-avx512f" "-al"
|
|
|
2e4410 |
@@ -692,6 +693,7 @@ if [expr ([istarget "i*86-*-*"] || [ista
|
|
|
2e4410 |
run_dump_test "x86-64-avx256int-intel"
|
|
|
2e4410 |
run_dump_test "x86-64-avx2"
|
|
|
2e4410 |
run_dump_test "x86-64-avx2-intel"
|
|
|
2e4410 |
+ run_dump_test "evex-no-scale-64"
|
|
|
2e4410 |
run_dump_test "x86-64-avx-gather"
|
|
|
2e4410 |
run_dump_test "x86-64-avx-gather-intel"
|
|
|
2e4410 |
run_dump_test "x86-64-avx512f"
|
|
|
2e4410 |
--- /dev/null 2020-08-21 07:54:54.335936348 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/testsuite/gas/i386/evex-no-scale.s 2020-08-21 10:41:30.411757740 +0100
|
|
|
2e4410 |
@@ -0,0 +1,18 @@
|
|
|
2e4410 |
+ .allow_index_reg
|
|
|
2e4410 |
+ .struct
|
|
|
2e4410 |
+ inc %eax
|
|
|
2e4410 |
+.equiv is_64bit, . > 1
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+ .text
|
|
|
2e4410 |
+disp:
|
|
|
2e4410 |
+.if is_64bit
|
|
|
2e4410 |
+ vmovaps -1024(%rip), %zmm0
|
|
|
2e4410 |
+ vmovaps 64(,%rax), %zmm0
|
|
|
2e4410 |
+ vmovaps 64(,%riz), %zmm0
|
|
|
2e4410 |
+.endif
|
|
|
2e4410 |
+ vmovaps 64(,%eax), %zmm0
|
|
|
2e4410 |
+ vmovaps 64(,%eiz), %zmm0
|
|
|
2e4410 |
+ vmovaps 64, %zmm0
|
|
|
2e4410 |
+.if !is_64bit
|
|
|
2e4410 |
+ addr16 vmovaps 64, %zmm0
|
|
|
2e4410 |
+.endif
|
|
|
2e4410 |
--- /dev/null 2020-08-21 07:54:54.335936348 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/testsuite/gas/i386/evex-no-scale-32.d 2020-08-21 10:41:37.347735430 +0100
|
|
|
2e4410 |
@@ -0,0 +1,14 @@
|
|
|
2e4410 |
+#source: evex-no-scale.s
|
|
|
2e4410 |
+#objdump: -dw
|
|
|
2e4410 |
+#name: ix86 EVEX no disp scaling
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+.*: +file format .*
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+Disassembly of section .text:
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+0+ <disp>:
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40\(,%eiz,1\),%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 05 40 00 00 00 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 67 62 f1 7c 48 28 06 40 00 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
+#pass
|
|
|
2e4410 |
--- /dev/null 2020-08-21 07:54:54.335936348 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/testsuite/gas/i386/evex-no-scale-64.d 2020-08-21 10:41:42.539718727 +0100
|
|
|
2e4410 |
@@ -0,0 +1,16 @@
|
|
|
2e4410 |
+#source: evex-no-scale.s
|
|
|
2e4410 |
+#objdump: -dw
|
|
|
2e4410 |
+#name: x86-64 EVEX no disp scaling
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+.*: +file format .*
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+Disassembly of section .text:
|
|
|
2e4410 |
+
|
|
|
2e4410 |
+0+ <disp>:
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 05 00 fc ff ff vmovaps -0x400\(%rip\),%zmm0 # .*
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%rax,1\),%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 67 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 67 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40\(,%eiz,1\),%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
+#pass
|
|
|
2e4410 |
--- binutils.orig/gas/testsuite/gas/i386/evex-no-scale.s 2020-08-21 12:48:57.859030235 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/testsuite/gas/i386/evex-no-scale.s 2020-08-21 12:53:26.631149341 +0100
|
|
|
2e4410 |
@@ -5,7 +5,7 @@
|
|
|
2e4410 |
|
|
|
2e4410 |
.text
|
|
|
2e4410 |
disp:
|
|
|
2e4410 |
-.if is_64bit
|
|
|
2e4410 |
+.ifdef x86_64
|
|
|
2e4410 |
vmovaps -1024(%rip), %zmm0
|
|
|
2e4410 |
vmovaps 64(,%rax), %zmm0
|
|
|
2e4410 |
vmovaps 64(,%riz), %zmm0
|
|
|
2e4410 |
@@ -13,6 +13,6 @@ disp:
|
|
|
2e4410 |
vmovaps 64(,%eax), %zmm0
|
|
|
2e4410 |
vmovaps 64(,%eiz), %zmm0
|
|
|
2e4410 |
vmovaps 64, %zmm0
|
|
|
2e4410 |
-.if !is_64bit
|
|
|
2e4410 |
+.ifndef x86_64
|
|
|
2e4410 |
addr16 vmovaps 64, %zmm0
|
|
|
2e4410 |
.endif
|
|
|
2e4410 |
--- binutils.orig/gas/testsuite/gas/i386/evex-no-scale-64.d 2020-08-21 12:48:57.860030232 +0100
|
|
|
2e4410 |
+++ binutils-2.30/gas/testsuite/gas/i386/evex-no-scale-64.d 2020-08-21 13:20:59.174525430 +0100
|
|
|
2e4410 |
@@ -11,6 +11,6 @@ Disassembly of section .text:
|
|
|
2e4410 |
+[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%rax,1\),%zmm0
|
|
|
2e4410 |
+[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
+[a-f0-9]+: 67 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
|
|
|
2e4410 |
- +[a-f0-9]+: 67 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40\(,%eiz,1\),%zmm0
|
|
|
2e4410 |
+ +[a-f0-9]+: 67 62 f1 7c 48 28 04 25 40 00 00 00 addr32 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
+[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
|
|
|
2e4410 |
#pass
|