Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
f6968f59
Commit
f6968f59
authored
28 years ago
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix last change; fix large stack frames and int->double conversion
From-SVN: r12944
parent
2eaa1d7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
62 deletions
+35
-62
gcc/config/rs6000/rs6000.md
+35
-62
No files found.
gcc/config/rs6000/rs6000.md
View file @
f6968f59
...
...
@@ -3741,18 +3741,20 @@
"
*
{
rtx indx;
HOST_WIDE_INT offset = rs6000_fpmem_offset;
if (rs6000_fpmem_offset > 32760)
indx = operands
[
1
]
;
{
indx = operands
[
1
]
;
offset &= 0xffff;
}
else if (frame_pointer_needed)
indx = frame_pointer_rtx;
else
indx = stack_pointer_rtx;
operands
[
2
]
= gen_rtx (MEM, SImode,
gen_rtx (PLUS, Pmode,
indx,
GEN_INT (rs6000_fpmem_offset)));
gen_rtx (PLUS, Pmode, indx, GEN_INT (offset)));
return
\"
lfd %0,%2
\"
;
}"
...
...
@@ -5583,7 +5585,14 @@
{
operands
[
2
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN == 0);
operands
[
3
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN != 0);
split_double (operands
[
1
]
, &operands
[
4
]
,
&operands[5]);
#ifdef HOST_WORDS_BIG_ENDIAN
operands
[
4
]
= GEN_INT (CONST_DOUBLE_LOW (operands
[
1
]
));
operands
[
5
]
= GEN_INT (CONST_DOUBLE_HIGH (operands
[
1
]
));
#else
operands
[
4
]
= GEN_INT (CONST_DOUBLE_HIGH (operands
[
1
]
));
operands
[
5
]
= GEN_INT (CONST_DOUBLE_LOW (operands
[
1
]
));
#endif
}")
(define_split
...
...
@@ -5595,15 +5604,18 @@
(set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))]
"
{
rtx high_rtx, low_rtx;
HOST_WIDE_INT high;
HOST_WIDE_INT low;
rtx high_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN == 0);
rtx low_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN != 0);
split_double (operands
[
1
]
, &high_rtx,
&low_rtx);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
#ifdef HOST_WORDS_BIG_ENDIAN
high = CONST_DOUBLE_LOW (operands
[
1
]
);
low = CONST_DOUBLE_HIGH (operands
[
1
]
);
#else
high = CONST_DOUBLE_HIGH (operands
[
1
]
);
low = CONST_DOUBLE_LOW (operands
[
1
]
);
#endif
if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000)
|| (low & 0xffff) == 0)
...
...
@@ -5634,13 +5646,8 @@
(set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))]
"
{
rtx high_rtx, low_rtx;
HOST_WIDE_INT high;
HOST_WIDE_INT low;
split_double (operands
[
1
]
, &high_rtx,
&low_rtx);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands
[
1
]
);
HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands
[
1
]
);
operands
[
2
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN == 0);
operands
[
3
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN != 0);
...
...
@@ -5802,10 +5809,8 @@
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
rtx high_rtx, low_rtx;
split_double (operands[1], &high_rtx, &low_rtx);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
low = CONST_DOUBLE_LOW (operands[1]);
high = CONST_DOUBLE_HIGH (operands[1]);
}
else
#if HOST_BITS_PER_WIDE_INT == 32
...
...
@@ -5943,7 +5948,8 @@
{
operands
[
2
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN == 0);
operands
[
3
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN != 0);
split_double (operands
[
1
]
, &operands
[
4
]
,
&operands[5]);
operands
[
4
]
= GEN_INT (CONST_DOUBLE_HIGH (operands
[
1
]
));
operands
[
5
]
= GEN_INT (CONST_DOUBLE_LOW (operands
[
1
]
));
}")
(define_split
...
...
@@ -5955,26 +5961,10 @@
(set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))]
"
{
rtx high_rtx, low_rtx;
HOST_WIDE_INT high;
HOST_WIDE_INT low;
rtx high_reg, low_reg;
if (WORDS_BIG_ENDIAN)
{
high_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 0);
low_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 1);
split_double (operands
[
1
]
, &high_rtx,
&low_rtx);
}
else
{
high_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 1);
low_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 0);
split_double (operands
[
1
]
, &low_rtx,
&high_rtx);
}
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands
[
1
]
);
HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands
[
1
]
);
rtx high_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN == 0);
rtx low_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN != 0);
if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000)
|| (low & 0xffff) == 0)
...
...
@@ -6005,23 +5995,8 @@
(set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))]
"
{
rtx high_rtx, low_rtx;
HOST_WIDE_INT high;
HOST_WIDE_INT low;
rtx high_reg, low_reg;
if (WORDS_BIG_ENDIAN)
{
high_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 0);
low_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 1);
split_double (operands
[
1
]
, &high_rtx,
&low_rtx);
}
else
{
high_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 1);
low_reg = gen_rtx (SUBREG, SImode, operands
[
0
]
, 0);
split_double (operands
[
1
]
, &low_rtx,
&high_rtx);
}
HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands
[
1
]
);
HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands
[
1
]
);
operands
[
2
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN == 0);
operands
[
3
]
= gen_rtx (SUBREG, SImode, operands
[
0
]
, WORDS_BIG_ENDIAN != 0);
...
...
@@ -6083,10 +6058,8 @@
if (GET_CODE (operands
[
1
]
) == CONST_DOUBLE)
{
rtx high_rtx, low_rtx;
split_double (operands
[
1
]
, &high_rtx,
&low_rtx);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
low = CONST_DOUBLE_LOW (operands
[
1
]
);
high = CONST_DOUBLE_HIGH (operands
[
1
]
);
}
else
#if HOST_BITS_PER_WIDE_INT == 32
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment