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
e533b2a4
Commit
e533b2a4
authored
14 years ago
by
Richard Henderson
Committed by
Richard Henderson
14 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alpha: Use byte-manipulation helper expanders more often.
From-SVN: r171439
parent
0b2a7367
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
22 deletions
+34
-22
gcc/ChangeLog
+8
-0
gcc/config/alpha/alpha.c
+26
-22
No files found.
gcc/ChangeLog
View file @
e533b2a4
2011-02-24 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_expand_unaligned_load): Use extql.
(alpha_expand_unaligned_store): Use mskwl, mskll, mskql.
(alpha_expand_unaligned_load_words): Use extql.
(alpha_expand_unaligned_store_words): Use insqh, mskqh, mskql.
(emit_insxl): Handle all modes for consistency.
2011-02-24 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (get_aligned_mem): Don't test WORDS_BIG_ENDIAN.
(alpha_expand_unaligned_load): Likewise.
(alpha_expand_unaligned_store): Likewise.
...
...
This diff is collapsed.
Click to expand it.
gcc/config/alpha/alpha.c
View file @
e533b2a4
...
...
@@ -3347,7 +3347,7 @@ alpha_expand_unaligned_load (rtx tgt, rtx mem, HOST_WIDE_INT size,
{
emit_move_insn
(
addr
,
plus_constant
(
mema
,
ofs
+
2
));
emit_insn
(
gen_ext
xl
(
extl
,
meml
,
GEN_INT
(
64
)
,
addr
));
emit_insn
(
gen_ext
ql
(
extl
,
meml
,
addr
));
emit_insn
(
gen_extqh
(
exth
,
memh
,
addr
));
/* We must use tgt here for the target. Alpha-vms port fails if we use
...
...
@@ -3367,17 +3367,14 @@ alpha_expand_unaligned_load (rtx tgt, rtx mem, HOST_WIDE_INT size,
emit_insn
(
gen_extwh
(
exth
,
memh
,
addr
));
mode
=
HImode
;
break
;
case
4
:
emit_insn
(
gen_extlh
(
exth
,
memh
,
addr
));
mode
=
SImode
;
break
;
case
8
:
emit_insn
(
gen_extqh
(
exth
,
memh
,
addr
));
mode
=
DImode
;
break
;
default
:
gcc_unreachable
();
}
...
...
@@ -3475,16 +3472,13 @@ alpha_expand_unaligned_store (rtx dst, rtx src,
switch
((
int
)
size
)
{
case
2
:
emit_insn
(
gen_msk
xl
(
dstl
,
dstl
,
GEN_INT
(
0xffff
)
,
addr
));
emit_insn
(
gen_msk
wl
(
dstl
,
dstl
,
addr
));
break
;
case
4
:
{
rtx
msk
=
immed_double_const
(
0xffffffff
,
0
,
DImode
);
emit_insn
(
gen_mskxl
(
dstl
,
dstl
,
msk
,
addr
));
break
;
}
emit_insn
(
gen_mskll
(
dstl
,
dstl
,
addr
));
break
;
case
8
:
emit_insn
(
gen_msk
xl
(
dstl
,
dstl
,
constm1_rtx
,
addr
));
emit_insn
(
gen_msk
ql
(
dstl
,
dstl
,
addr
));
break
;
default
:
gcc_unreachable
();
...
...
@@ -3516,7 +3510,6 @@ alpha_expand_unaligned_load_words (rtx *out_regs, rtx smem,
HOST_WIDE_INT
words
,
HOST_WIDE_INT
ofs
)
{
rtx
const
im8
=
GEN_INT
(
-
8
);
rtx
const
i64
=
GEN_INT
(
64
);
rtx
ext_tmps
[
MAX_MOVE_WORDS
],
data_regs
[
MAX_MOVE_WORDS
+
1
];
rtx
sreg
,
areg
,
tmp
,
smema
;
HOST_WIDE_INT
i
;
...
...
@@ -3563,7 +3556,7 @@ alpha_expand_unaligned_load_words (rtx *out_regs, rtx smem,
1
,
OPTAB_WIDEN
);
for
(
i
=
0
;
i
<
words
;
++
i
)
{
emit_insn
(
gen_ext
xl
(
data_regs
[
i
],
data_regs
[
i
],
i64
,
sreg
));
emit_insn
(
gen_ext
ql
(
data_regs
[
i
],
data_regs
[
i
]
,
sreg
));
emit_insn
(
gen_extqh
(
ext_tmps
[
i
],
data_regs
[
i
+
1
],
sreg
));
emit_insn
(
gen_rtx_SET
(
VOIDmode
,
ext_tmps
[
i
],
gen_rtx_IF_THEN_ELSE
(
DImode
,
...
...
@@ -3588,7 +3581,6 @@ alpha_expand_unaligned_store_words (rtx *data_regs, rtx dmem,
HOST_WIDE_INT
words
,
HOST_WIDE_INT
ofs
)
{
rtx
const
im8
=
GEN_INT
(
-
8
);
rtx
const
i64
=
GEN_INT
(
64
);
rtx
ins_tmps
[
MAX_MOVE_WORDS
];
rtx
st_tmp_1
,
st_tmp_2
,
dreg
;
rtx
st_addr_1
,
st_addr_2
,
dmema
;
...
...
@@ -3628,7 +3620,7 @@ alpha_expand_unaligned_store_words (rtx *data_regs, rtx dmem,
{
for
(
i
=
words
-
1
;
i
>=
0
;
--
i
)
{
emit_insn
(
gen_ins
xh
(
ins_tmps
[
i
],
data_regs
[
i
],
i64
,
dreg
));
emit_insn
(
gen_ins
qh
(
ins_tmps
[
i
],
data_regs
[
i
]
,
dreg
));
emit_insn
(
gen_insql
(
data_regs
[
i
],
data_regs
[
i
],
dreg
));
}
for
(
i
=
words
-
1
;
i
>
0
;
--
i
)
...
...
@@ -3640,8 +3632,8 @@ alpha_expand_unaligned_store_words (rtx *data_regs, rtx dmem,
}
/* Split and merge the ends with the destination data. */
emit_insn
(
gen_msk
xh
(
st_tmp_2
,
st_tmp_2
,
i64
,
dreg
));
emit_insn
(
gen_msk
xl
(
st_tmp_1
,
st_tmp_1
,
constm1_rtx
,
dreg
));
emit_insn
(
gen_msk
qh
(
st_tmp_2
,
st_tmp_2
,
dreg
));
emit_insn
(
gen_msk
ql
(
st_tmp_1
,
st_tmp_1
,
dreg
));
if
(
data_regs
!=
NULL
)
{
...
...
@@ -4311,12 +4303,24 @@ emit_insxl (enum machine_mode mode, rtx op1, rtx op2)
rtx
ret
=
gen_reg_rtx
(
DImode
);
rtx
(
*
fn
)
(
rtx
,
rtx
,
rtx
);
if
(
mode
==
QImode
)
fn
=
gen_insbl
;
else
fn
=
gen_inswl
;
switch
(
mode
)
{
case
QImode
:
fn
=
gen_insbl
;
break
;
case
HImode
:
fn
=
gen_inswl
;
break
;
case
SImode
:
fn
=
gen_insll
;
break
;
case
DImode
:
fn
=
gen_insql
;
break
;
default
:
gcc_unreachable
();
}
/* The insbl and inswl patterns require a register operand. */
op1
=
force_reg
(
mode
,
op1
);
emit_insn
(
fn
(
ret
,
op1
,
op2
));
...
...
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