summaryrefslogtreecommitdiff
path: root/none
diff options
context:
space:
mode:
authortom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>2011-03-28 13:51:41 +0000
committertom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>2011-03-28 13:51:41 +0000
commitd5ea6f504536f745bc8cc3b67da837bee6f8de25 (patch)
tree25408de7392b4360ba4cc742865aded193dc5f10 /none
parent6647d5237ae9024c1780546f74275f81fd83c8d9 (diff)
Use two separate assembler argument bindings for loading or storing
a value in an xmm register as trying to do it with offsets from a single argument apparently causes problems in newer gcc versions. Fix to bug #266931. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11672 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'none')
-rw-r--r--none/tests/amd64/gen_insn_test.pl48
-rw-r--r--none/tests/x86/gen_insn_test.pl48
2 files changed, 80 insertions, 16 deletions
diff --git a/none/tests/amd64/gen_insn_test.pl b/none/tests/amd64/gen_insn_test.pl
index 91dec10e..409249e3 100644
--- a/none/tests/amd64/gen_insn_test.pl
+++ b/none/tests/amd64/gen_insn_test.pl
@@ -628,14 +628,30 @@ while (<>)
foreach my $result (@results)
{
- $result->{argnum} = $argnum++;
+ if ($result->{type} eq "xmm")
+ {
+ $result->{argnuml} = $argnum++;
+ $result->{argnumh} = $argnum++;
+ }
+ else
+ {
+ $result->{argnum} = $argnum++;
+ }
}
foreach my $arg (@presets, @args)
{
if (defined($arg->{name}))
{
- $arg->{argnum} = $argnum++;
+ if ($arg->{type} eq "xmm")
+ {
+ $arg->{argnuml} = $argnum++;
+ $arg->{argnumh} = $argnum++;
+ }
+ else
+ {
+ $arg->{argnum} = $argnum++;
+ }
}
}
@@ -678,8 +694,8 @@ while (<>)
}
elsif ($arg->{type} eq "xmm")
{
- print qq| \"movlps 0+%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
- print qq| \"movhps 8+%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movlps %$arg->{argnuml}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movhps %$arg->{argnumh}, %%$arg->{register}\\n\"\n|;
}
elsif ($arg->{type} eq "st")
{
@@ -792,8 +808,8 @@ while (<>)
}
elsif ($result->{type} eq "xmm")
{
- print qq| \"movlps %%$result->{register}, 0+%$result->{argnum}\\n\"\n|;
- print qq| \"movhps %%$result->{register}, 8+%$result->{argnum}\\n\"\n|;
+ print qq| \"movlps %%$result->{register}, %$result->{argnuml}\\n\"\n|;
+ print qq| \"movhps %%$result->{register}, %$result->{argnumh}\\n\"\n|;
}
elsif ($result->{type} eq "st")
{
@@ -841,7 +857,15 @@ while (<>)
foreach my $result (@results)
{
- print qq|$prefix\"=m\" \($result->{name}\)|;
+ if ($result->{type} eq "xmm")
+ {
+ print qq|$prefix\"=m\" \($result->{name}.uq[0]\), \"=m\" \($result->{name}.uq[1]\)|;
+ }
+ else
+ {
+ print qq|$prefix\"=m\" \($result->{name}\)|;
+ }
+
$prefix = ", ";
}
@@ -853,7 +877,15 @@ while (<>)
{
if (defined($arg->{name}))
{
- print qq|$prefix\"m\" \($arg->{name}\)|;
+ if ($arg->{type} eq "xmm")
+ {
+ print qq|$prefix\"m\" \($arg->{name}.uq[0]\), \"m\" \($arg->{name}.uq[1]\)|;
+ }
+ else
+ {
+ print qq|$prefix\"m\" \($arg->{name}\)|;
+ }
+
$prefix = ", ";
}
}
diff --git a/none/tests/x86/gen_insn_test.pl b/none/tests/x86/gen_insn_test.pl
index b6ecb639..1fc3a3a5 100644
--- a/none/tests/x86/gen_insn_test.pl
+++ b/none/tests/x86/gen_insn_test.pl
@@ -605,14 +605,30 @@ while (<>)
foreach my $result (@results)
{
- $result->{argnum} = $argnum++;
+ if ($result->{type} eq "xmm")
+ {
+ $result->{argnuml} = $argnum++;
+ $result->{argnumh} = $argnum++;
+ }
+ else
+ {
+ $result->{argnum} = $argnum++;
+ }
}
foreach my $arg (@presets, @args)
{
if (defined($arg->{name}))
{
- $arg->{argnum} = $argnum++;
+ if ($arg->{type} eq "xmm")
+ {
+ $arg->{argnuml} = $argnum++;
+ $arg->{argnumh} = $argnum++;
+ }
+ else
+ {
+ $arg->{argnum} = $argnum++;
+ }
}
}
@@ -647,8 +663,8 @@ while (<>)
}
elsif ($arg->{type} eq "xmm")
{
- print qq| \"movlps 0%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
- print qq| \"movhps 8%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movlps %$arg->{argnuml}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movhps %$arg->{argnumh}, %%$arg->{register}\\n\"\n|;
}
elsif ($arg->{type} eq "st")
{
@@ -756,8 +772,8 @@ while (<>)
}
elsif ($result->{type} eq "xmm")
{
- print qq| \"movlps %%$result->{register}, 0%$result->{argnum}\\n\"\n|;
- print qq| \"movhps %%$result->{register}, 8%$result->{argnum}\\n\"\n|;
+ print qq| \"movlps %%$result->{register}, %$result->{argnuml}\\n\"\n|;
+ print qq| \"movhps %%$result->{register}, %$result->{argnumh}\\n\"\n|;
}
elsif ($result->{type} eq "st")
{
@@ -806,7 +822,15 @@ while (<>)
foreach my $result (@results)
{
- print qq|$prefix\"=m\" \($result->{name}\)|;
+ if ($result->{type} eq "xmm")
+ {
+ print qq|$prefix\"=m\" \($result->{name}.uq[0]\), \"=m\" \($result->{name}.uq[1]\)|;
+ }
+ else
+ {
+ print qq|$prefix\"=m\" \($result->{name}\)|;
+ }
+
$prefix = ", ";
}
@@ -818,7 +842,15 @@ while (<>)
{
if (defined($arg->{name}))
{
- print qq|$prefix\"m\" \($arg->{name}\)|;
+ if ($arg->{type} eq "xmm")
+ {
+ print qq|$prefix\"m\" \($arg->{name}.uq[0]\), \"m\" \($arg->{name}.uq[1]\)|;
+ }
+ else
+ {
+ print qq|$prefix\"m\" \($arg->{name}\)|;
+ }
+
$prefix = ", ";
}
}