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
64a184e9
Commit
64a184e9
authored
Mar 14, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r481
parent
a130a441
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
161 additions
and
12 deletions
+161
-12
gcc/config/m68k/m68k.c
+161
-12
No files found.
gcc/config/m68k/m68k.c
View file @
64a184e9
...
...
@@ -50,11 +50,11 @@ rtx legitimize_pic_address ();
/* Emit a (use pic_offset_table_rtx) if we used PIC relocation in the
function at any time during the compilation process. In the future
we should try and eliminate the USE if we can easily deterine that
we should try and eliminate the USE if we can easily deter
m
ine that
all PIC references were deleted from the current function. That would
save an address register */
finalize_pic
()
finalize_pic
()
{
if
(
flag_pic
&&
current_function_uses_pic_offset_table
)
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
pic_offset_table_rtx
));
...
...
@@ -190,7 +190,7 @@ output_function_prologue (stream, size)
if
(
mask
&
(
1
<<
i
))
asm_fprintf
(
stream
,
#ifdef MOTOROLA
"
\t
mov
.l %s,-(%Rsp)
\n
"
,
"
\t
%Omove
.l %s,-(%Rsp)
\n
"
,
#else
"
\t
movel %s,%Rsp@-
\n
"
,
#endif
...
...
@@ -207,7 +207,7 @@ output_function_prologue (stream, size)
if
(
flag_pic
&&
current_function_uses_pic_offset_table
)
{
#ifdef MOTOROLA
asm_fprintf
(
stream
,
"
\t
mov
.l %I__GLOBAL_OFFSET_TABLE_, %s
\n
"
,
asm_fprintf
(
stream
,
"
\t
%Omove
.l %I__GLOBAL_OFFSET_TABLE_, %s
\n
"
,
reg_names
[
PIC_OFFSET_TABLE_REGNUM
]);
asm_fprintf
(
stream
,
"
\t
lea.l (%Rpc,%s.l),%s
\n
"
,
reg_names
[
PIC_OFFSET_TABLE_REGNUM
],
...
...
@@ -303,7 +303,7 @@ output_function_epilogue (stream, size)
&&
(
mask
||
fmask
||
fpoffset
))
{
#ifdef MOTOROLA
asm_fprintf
(
stream
,
"
\t
mov
.l %0I%d,%Ra0
\n
"
,
-
fsize
);
asm_fprintf
(
stream
,
"
\t
%Omove
.l %0I%d,%Ra0
\n
"
,
-
fsize
);
#else
asm_fprintf
(
stream
,
"
\t
movel %0I%d,%Ra0
\n
"
,
-
fsize
);
#endif
...
...
@@ -325,7 +325,7 @@ output_function_epilogue (stream, size)
if
(
big
)
{
#ifdef MOTOROLA
asm_fprintf
(
stream
,
"
\t
mov
.l -%d(%s,%Ra0.l),%s
\n
"
,
asm_fprintf
(
stream
,
"
\t
%Omove
.l -%d(%s,%Ra0.l),%s
\n
"
,
offset
+
fsize
,
reg_names
[
FRAME_POINTER_REGNUM
],
reg_names
[
i
]);
...
...
@@ -338,7 +338,7 @@ output_function_epilogue (stream, size)
else
if
(
!
frame_pointer_needed
)
{
#ifdef MOTOROLA
asm_fprintf
(
stream
,
"
\t
mov
.l (%Rsp)+,%s
\n
"
,
asm_fprintf
(
stream
,
"
\t
%Omove
.l (%Rsp)+,%s
\n
"
,
reg_names
[
i
]);
#else
asm_fprintf
(
stream
,
"
\t
movel %Rsp@+,%s
\n
"
,
...
...
@@ -348,7 +348,7 @@ output_function_epilogue (stream, size)
else
{
#ifdef MOTOROLA
asm_fprintf
(
stream
,
"
\t
mov
.l -%d(%s),%s
\n
"
,
asm_fprintf
(
stream
,
"
\t
%Omove
.l -%d(%s),%s
\n
"
,
offset
+
fsize
,
reg_names
[
FRAME_POINTER_REGNUM
],
reg_names
[
i
]);
...
...
@@ -515,6 +515,155 @@ not_sp_operand (op, mode)
return
op
!=
stack_pointer_rtx
&&
general_operand
(
op
,
mode
);
}
/* Return TRUE if X is a valid comparison operator for the dbcc
instruction.
Note it rejects floating point comparison operators.
(In the future we could use Fdbcc).
It also rejects some comparisons when CC_NO_OVERFLOW is set. */
int
valid_dbcc_comparison_p
(
x
,
mode
)
rtx
x
;
enum
machine_mode
mode
;
{
/* We could add support for these in the future */
if
(
cc_prev_status
.
flags
&
CC_IN_68881
)
return
0
;
switch
(
GET_CODE
(
x
))
{
case
EQ
:
case
NE
:
case
GTU
:
case
LTU
:
case
GEU
:
case
LEU
:
return
1
;
/* Reject some when CC_NO_OVERFLOW is set. This may be over
conservative */
case
GT
:
case
LT
:
case
GE
:
case
LE
:
return
!
(
cc_prev_status
.
flags
&
CC_NO_OVERFLOW
);
default
:
return
0
;
}
}
/* Output a dbCC; jCC sequence. Note we do not handle the
floating point version of this sequence (Fdbcc). We also
do not handle alternative conditions when CC_NO_OVERFLOW is
set. It is assumed that valid_dbcc_comparison_p will kick
those out before we get here. */
output_dbcc_and_branch
(
operands
)
rtx
*
operands
;
{
switch
(
GET_CODE
(
operands
[
3
]))
{
case
EQ
:
#ifdef MOTOROLA
output_asm_insn
(
"dbeq %0,%l1
\n\t
jbeq %l2"
,
operands
);
#else
output_asm_insn
(
"dbeq %0,%l1
\n\t
jeq %l2"
,
operands
);
#endif
break
;
case
NE
:
#ifdef MOTOROLA
output_asm_insn
(
"dbne %0,%l1
\n\t
jbne %l2"
,
operands
);
#else
output_asm_insn
(
"dbne %0,%l1
\n\t
jne %l2"
,
operands
);
#endif
break
;
case
GT
:
#ifdef MOTOROLA
output_asm_insn
(
"dbgt %0,%l1
\n\t
jbgt %l2"
,
operands
);
#else
output_asm_insn
(
"dbgt %0,%l1
\n\t
jgt %l2"
,
operands
);
#endif
break
;
case
GTU
:
#ifdef MOTOROLA
output_asm_insn
(
"dbhi %0,%l1
\n\t
jbhi %l2"
,
operands
);
#else
output_asm_insn
(
"dbhi %0,%l1
\n\t
jhi %l2"
,
operands
);
#endif
break
;
case
LT
:
#ifdef MOTOROLA
output_asm_insn
(
"dblt %0,%l1
\n\t
jblt %l2"
,
operands
);
#else
output_asm_insn
(
"dblt %0,%l1
\n\t
jlt %l2"
,
operands
);
#endif
break
;
case
LTU
:
#ifdef MOTOROLA
output_asm_insn
(
"dbcs %0,%l1
\n\t
jbcs %l2"
,
operands
);
#else
output_asm_insn
(
"dbcs %0,%l1
\n\t
jcs %l2"
,
operands
);
#endif
break
;
case
GE
:
#ifdef MOTOROLA
output_asm_insn
(
"dbge %0,%l1
\n\t
jbge %l2"
,
operands
);
#else
output_asm_insn
(
"dbge %0,%l1
\n\t
jge %l2"
,
operands
);
#endif
break
;
case
GEU
:
#ifdef MOTOROLA
output_asm_insn
(
"dbcc %0,%l1
\n\t
jbcc %l2"
,
operands
);
#else
output_asm_insn
(
"dbcc %0,%l1
\n\t
jcc %l2"
,
operands
);
#endif
break
;
case
LE
:
#ifdef MOTOROLA
output_asm_insn
(
"dble %0,%l1
\n\t
jble %l2"
,
operands
);
#else
output_asm_insn
(
"dble %0,%l1
\n\t
jle %l2"
,
operands
);
#endif
break
;
case
LEU
:
#ifdef MOTOROLA
output_asm_insn
(
"dbls %0,%l1
\n\t
jbls %l2"
,
operands
);
#else
output_asm_insn
(
"dbls %0,%l1
\n\t
jls %l2"
,
operands
);
#endif
break
;
default
:
abort
();
}
/* If the decrement is to be done in SImode, then we have
to compensate for the fact that dbcc decrements in HImode. */
switch
(
GET_MODE
(
operands
[
0
]))
{
case
SImode
:
#ifdef MOTOROLA
output_asm_insn
(
"clr%.w %0
\n\t
subq%.l %#1,%0
\n\t
jbpl %l1"
,
operands
);
#else
output_asm_insn
(
"clr%.w %0
\n\t
subq%.l %#1,%0
\n\t
jpl %l1"
,
operands
);
#endif
break
;
case
HImode
:
break
;
default
:
abort
();
}
}
char
*
output_btst
(
operands
,
countop
,
dataop
,
insn
,
signpos
)
rtx
*
operands
;
...
...
@@ -697,7 +846,7 @@ singlemove_string (operands)
&&
INTVAL
(
operands
[
1
])
<
128
&&
INTVAL
(
operands
[
1
])
>=
-
128
)
{
#if defined
(MOTOROLA) && !defined
(CRDS)
#if defined
(MOTOROLA) && !defined
(CRDS)
return
"moveq%.l %1,%0"
;
#else
return
"moveq %1,%0"
;
...
...
@@ -1018,7 +1167,7 @@ output_move_const_double (operands)
rtx
*
operands
;
{
#ifdef SUPPORT_SUN_FPA
if
(
TARGET_FPA
&&
FPA_REG_P
(
operands
[
0
]))
if
(
TARGET_FPA
&&
FPA_REG_P
(
operands
[
0
]))
{
int
code
=
standard_sun_fpa_constant_p
(
operands
[
1
]);
...
...
@@ -1244,7 +1393,7 @@ standard_sun_fpa_constant_p (x)
/*
* Stuff that looks different if it's single or double
*/
if
(
GET_MODE
(
x
)
==
SFmode
)
if
(
GET_MODE
(
x
)
==
SFmode
)
{
if
(
d
==
S_E
)
return
0x8
;
...
...
@@ -1452,7 +1601,7 @@ print_operand (file, op, letter)
}
#ifdef SUPPORT_SUN_FPA
else
if
((
letter
==
'y'
||
letter
==
'w'
)
&&
GET_CODE
(
op
)
==
CONST_DOUBLE
&&
GET_CODE
(
op
)
==
CONST_DOUBLE
&&
(
i
=
standard_sun_fpa_constant_p
(
op
)))
{
fprintf
(
file
,
"%%%d"
,
i
&
0x1ff
);
...
...
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