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
cc2394a4
Commit
cc2394a4
authored
Aug 24, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(call): Rework to use macro version of jsr.
From-SVN: r7967
parent
6bcf5f0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
43 deletions
+35
-43
gcc/config/alpha/alpha.md
+35
-43
No files found.
gcc/config/alpha/alpha.md
View file @
cc2394a4
...
...
@@ -2406,28 +2406,31 @@
;; Here are the CALL and unconditional branch insns.
(define_expand "call"
[
(parallel
[
(call (mem:DI (match_
dup 2
))
[
(parallel
[
(call (mem:DI (match_
operand 0 "" ""
))
(match_operand 1 "" ""))
(
use (match_operand:DI 0 "" ""
))
(
clobber (reg:DI 27
))
(clobber (reg:DI 26))])]
""
"
{ if (GET_CODE (operands
[
0
]
) != MEM)
abort ();
operands
[
0
]
= XEXP (operands
[
0
]
, 0);
operands
[
2
]
= gen_rtx (REG, DImode, 27);
emit_move_insn (operands
[
2
]
, operands
[
0
]
);
operands
[
0
]
= XEXP (operands
[
0
]
, 0);
if (GET_CODE (operands
[
0
]
) != SYMBOL_REF)
operands
[
0
]
= const0_rtx;
if (GET_CODE (operands
[
0
]
) != SYMBOL_REF
&& ! (GET_CODE (operands
[
0
]
) == REG && REGNO (operands
[
0
]
) == 27))
{
rtx tem = gen_rtx (REG, DImode, 27);
emit_move_insn (tem, operands
[
0
]
);
operands
[
0
]
= tem;
}
}")
(define_expand "call_value"
[
(parallel
[
(set (match_operand 0 "" "")
(call (mem:DI (match_
dup 3
))
(call (mem:DI (match_
operand 1 "" ""
))
(match_operand 2 "" "")))
(
use (match_operand:DI 1 "" ""
))
(
clobber (reg:DI 27
))
(clobber (reg:DI 26))])]
""
"
...
...
@@ -2436,50 +2439,39 @@
operands
[
1
]
= XEXP (operands
[
1
]
, 0);
operands
[
3
]
= gen_rtx (REG, DImode, 27);
emit_move_insn (operands
[
3
]
, operands
[
1
]
);
if (GET_CODE (operands
[
1
]
) != SYMBOL_REF)
operands
[
1
]
= const0_rtx;
if (GET_CODE (operands
[
1
]
) != SYMBOL_REF
&& ! (GET_CODE (operands
[
1
]
) == REG && REGNO (operands
[
1
]
) == 27))
{
rtx tem = gen_rtx (REG, DImode, 27);
emit_move_insn (tem, operands
[
1
]
);
operands
[
1
]
= tem;
}
}")
(define_insn ""
[
(call (mem:DI (
reg:DI 27
))
(match_operand
0
"" ""))
(
use (match_operand:DI 1 "" ""
))
[
(call (mem:DI (
match_operand:DI 0 "call_operand" "r,R,i"
))
(match_operand
1
"" ""))
(
clobber (reg:DI 27
))
(clobber (reg:DI 26))]
""
"jsr $26,($27),%1
\;
ldgp $29,0($26)"
[
(set_attr "type" "jsr")
]
)
(define_insn ""
[
(set (match_operand 0 "register_operand" "=rf")
(call (mem:DI (reg:DI 27))
(match_operand 1 "" "")))
(use (match_operand:DI 2 "" ""))
(clobber (reg:DI 26))]
""
"jsr $26,($27),%2
\;
ldgp $29,0($26)"
[
(set_attr "type" "jsr")
]
)
(define_insn ""
[
(call (mem:DI (match_operand 1 "current_file_function_operand" "i"))
(match_operand 0 "" ""))
(use (match_dup 1))
(clobber (reg:DI 26))]
""
"bsr $26,%1..ng"
[
(set_attr "type" "ibr")
]
)
"@
jsr $26,($27),0
\;
ldgp $29,0($26)
bsr $26,%0..ng
jsr $26,%0
\;
ldgp $29,0($26)"
[
(set_attr "type" "jsr,jsr,ibr")
]
)
(define_insn ""
[
(set (match_operand 0 "register_operand" "=rf")
(call (mem:DI (match_operand
1 "current_file_function_operand" "
i"))
[
(set (match_operand 0 "register_operand" "=rf
,rf,rf
")
(call (mem:DI (match_operand
:DI 1 "call_operand" "r,R,
i"))
(match_operand 2 "" "")))
(
use (match_dup 1
))
(
clobber (reg:DI 27
))
(clobber (reg:DI 26))]
""
"bsr $26,%1..ng"
[
(set_attr "type" "ibr")
]
)
"@
jsr $26,($27),0
\;
ldgp $29,0($26)
bsr $26,%1..ng
jsr $26,%1
\;
ldgp $29,0($26)"
[
(set_attr "type" "jsr,jsr,ibr")
]
)
;; Call subroutine returning any type.
...
...
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