[aarch64-port-dev ] Delete KILL of rFlagsReg from boolean ops
Andrew Haley
aph at redhat.com
Tue Dec 10 08:40:37 PST 2013
We're using the flag-setting form of some boolean ops; fixed thusly.
Andrew.
# HG changeset patch
# User aph
# Date 1386685708 0
# Node ID 93b2e2d86bbd1e550697dfb099cd2eb38ca69b19
# Parent f8503cf6d8a891cd780fad9d4c8c276dd5b717a5
Delete KILL of rFlagsReg from boolean ops
diff -r f8503cf6d8a8 -r 93b2e2d86bbd src/cpu/aarch64/vm/aarch64.ad
--- a/src/cpu/aarch64/vm/aarch64.ad Tue Dec 10 13:52:33 2013 +0000
+++ b/src/cpu/aarch64/vm/aarch64.ad Tue Dec 10 14:28:28 2013 +0000
@@ -7106,10 +7106,8 @@
instruct negI_reg(iRegINoSp dst, iRegIorL2I src, immI0 zero, rFlagsReg cr) %{
match(Set dst (SubI zero src));
- effect(KILL cr);
-
- ins_cost(DEFAULT_COST);
- format %{ "negsw $dst, $src\t# int" %}
+ ins_cost(DEFAULT_COST);
+ format %{ "negw $dst, $src\t# int" %}
ins_encode %{
__ negsw(as_Register($dst$$reg),
@@ -7124,14 +7122,12 @@
instruct negL_reg(iRegLNoSp dst, iRegIorL2I src, immL0 zero, rFlagsReg cr) %{
match(Set dst (SubL zero src));
- effect(KILL cr);
-
- ins_cost(DEFAULT_COST);
- format %{ "negs $dst, $src\t# long" %}
-
- ins_encode %{
- __ negs(as_Register($dst$$reg),
- as_Register($src$$reg));
+ ins_cost(DEFAULT_COST);
+ format %{ "neg $dst, $src\t# long" %}
+
+ ins_encode %{
+ __ neg(as_Register($dst$$reg),
+ as_Register($src$$reg));
%}
ins_pipe(pipe_class_default);
@@ -9467,14 +9463,13 @@
instruct andI_reg_reg(iRegINoSp dst, iRegIorL2I src1, iRegIorL2I src2, rFlagsReg cr) %{
match(Set dst (AndI src1 src2));
- effect(KILL cr);
-
- format %{ "andsw $dst, $src1, $src2\t# int" %}
-
- ins_encode %{
- __ andsw(as_Register($dst$$reg),
- as_Register($src1$$reg),
- as_Register($src2$$reg));
+
+ format %{ "andw $dst, $src1, $src2\t# int" %}
+
+ ins_encode %{
+ __ andw(as_Register($dst$$reg),
+ as_Register($src1$$reg),
+ as_Register($src2$$reg));
%}
ins_pipe(pipe_class_default);
@@ -9482,14 +9477,13 @@
instruct andI_reg_imm(iRegINoSp dst, iRegIorL2I src1, immILog src2, rFlagsReg cr) %{
match(Set dst (AndI src1 src2));
- effect(KILL cr);
format %{ "andsw $dst, $src1, $src2\t# int" %}
ins_encode %{
- __ andsw(as_Register($dst$$reg),
- as_Register($src1$$reg),
- (unsigned long)($src2$$constant));
+ __ andw(as_Register($dst$$reg),
+ as_Register($src1$$reg),
+ (unsigned long)($src2$$constant));
%}
ins_pipe(pipe_class_default);
@@ -9560,14 +9554,13 @@
instruct andL_reg_reg(iRegLNoSp dst, iRegL src1, iRegL src2, rFlagsReg cr) %{
match(Set dst (AndL src1 src2));
- effect(KILL cr);
-
- format %{ "ands $dst, $src1, $src2\t# int" %}
-
- ins_encode %{
- __ ands(as_Register($dst$$reg),
- as_Register($src1$$reg),
- as_Register($src2$$reg));
+
+ format %{ "and $dst, $src1, $src2\t# int" %}
+
+ ins_encode %{
+ __ andr(as_Register($dst$$reg),
+ as_Register($src1$$reg),
+ as_Register($src2$$reg));
%}
ins_pipe(pipe_class_default);
@@ -9575,12 +9568,11 @@
instruct andL_reg_imm(iRegLNoSp dst, iRegL src1, immLLog src2, rFlagsReg cr) %{
match(Set dst (AndL src1 src2));
- effect(KILL cr);
-
- format %{ "ands $dst, $src1, $src2\t# int" %}
-
- ins_encode %{
- __ ands(as_Register($dst$$reg),
+
+ format %{ "and $dst, $src1, $src2\t# int" %}
+
+ ins_encode %{
+ __ andr(as_Register($dst$$reg),
as_Register($src1$$reg),
(unsigned long)($src2$$constant));
%}
More information about the aarch64-port-dev
mailing list