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
c5c60e15
Commit
c5c60e15
authored
Aug 23, 1999
by
Bernd Schmidt
Committed by
Bernd Schmidt
Aug 23, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sparc compilation failure
From-SVN: r28807
parent
34e45676
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
92 deletions
+49
-92
gcc/ChangeLog
+13
-0
gcc/config/sparc/sparc.h
+5
-0
gcc/config/sparc/sparc.md
+5
-77
gcc/expr.h
+0
-4
gcc/optabs.c
+17
-11
gcc/tm.texi
+9
-0
No files found.
gcc/ChangeLog
View file @
c5c60e15
Mon
Aug
23
16
:
04
:
13
1999
Bernd
Schmidt
<
bernds
@cygnus
.
co
.
uk
>
*
optabs
.
c
(
prepare_cmp_insn
)
:
Turn
COMPARISON
arg
into
a
pointer
.
All
callers
changed
.
(
prepare_float_lib_cmp
)
:
Likewise
.
Use
FLOAT_LIB_COMPARE_RETURNS_BOOL
.
*
expr
.
h
(
emit_float_lib_cmp
)
:
Delete
declaration
.
*
tm
.
texi
(
FLOAT_LIB_COMPARE_RETURNS_BOOL
)
:
Document
.
*
sparc
.
h
(
FLOAT_LIB_COMPARE_RETURNS_BOOL
)
:
Define
.
*
sparc
.
md
(
bcc
and
scc
patterns
)
:
Don
'
t
handle
TFmode
comparisons
specially
.
(
cmptf
)
:
Now
conditional
on
TARGET_HARD_QUAD
.
Fri
Aug
20
17
:
52
:
27
1999
Jim
Wilson
<
wilson
@cygnus
.
com
>
Fri
Aug
20
17
:
52
:
27
1999
Jim
Wilson
<
wilson
@cygnus
.
com
>
*
resource
.
c
(
mark_target_live_regs
)
:
Use
*
resource
.
c
(
mark_target_live_regs
)
:
Use
...
...
gcc/config/sparc/sparc.h
View file @
c5c60e15
...
@@ -2676,6 +2676,11 @@ do { \
...
@@ -2676,6 +2676,11 @@ do { \
/* This is meant to be redefined in the host dependent files */
/* This is meant to be redefined in the host dependent files */
#define INIT_SUBTARGET_OPTABS
#define INIT_SUBTARGET_OPTABS
/* Nonzero if a floating point comparison library call for
mode MODE that will return a boolean value. Zero if one
of the libgcc2 functions is used. */
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
/* Compute the cost of computing a constant rtl expression RTX
/* Compute the cost of computing a constant rtl expression RTX
whose rtx-code is CODE. The body of this macro is a portion
whose rtx-code is CODE. The body of this macro is a portion
of a switch statement. If the code is computed here,
of a switch statement. If the code is computed here,
...
...
gcc/config/sparc/sparc.md
View file @
c5c60e15
...
@@ -606,7 +606,7 @@
...
@@ -606,7 +606,7 @@
[
(set (reg:CCFP 96)
[
(set (reg:CCFP 96)
(compare:CCFP (match_operand:TF 0 "register_operand" "")
(compare:CCFP (match_operand:TF 0 "register_operand" "")
(match_operand:TF 1 "register_operand" "")))]
(match_operand:TF 1 "register_operand" "")))]
"TARGET_FPU"
"TARGET_FPU
&& TARGET_HARD_QUAD
"
"
"
{
{
sparc_compare_op0 = operands
[
0
]
;
sparc_compare_op0 = operands
[
0
]
;
...
@@ -834,12 +834,6 @@
...
@@ -834,12 +834,6 @@
emit_insn (pat);
emit_insn (pat);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, EQ);
emit_insn (gen_sne (operands
[
0
]
));
DONE;
}
else if (TARGET_V9)
else if (TARGET_V9)
{
{
if (gen_v9_scc (EQ, operands))
if (gen_v9_scc (EQ, operands))
...
@@ -887,12 +881,6 @@
...
@@ -887,12 +881,6 @@
emit_insn (pat);
emit_insn (pat);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, NE);
emit_insn (gen_sne (operands
[
0
]
));
DONE;
}
else if (TARGET_V9)
else if (TARGET_V9)
{
{
if (gen_v9_scc (NE, operands))
if (gen_v9_scc (NE, operands))
...
@@ -908,13 +896,7 @@
...
@@ -908,13 +896,7 @@
"! TARGET_LIVE_G0"
"! TARGET_LIVE_G0"
"
"
{
{
if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
if (TARGET_V9)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, GT);
emit_insn (gen_sne (operands
[
0
]
));
DONE;
}
else if (TARGET_V9)
{
{
if (gen_v9_scc (GT, operands))
if (gen_v9_scc (GT, operands))
DONE;
DONE;
...
@@ -929,13 +911,7 @@
...
@@ -929,13 +911,7 @@
"! TARGET_LIVE_G0"
"! TARGET_LIVE_G0"
"
"
{
{
if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
if (TARGET_V9)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, LT);
emit_insn (gen_sne (operands
[
0
]
));
DONE;
}
else if (TARGET_V9)
{
{
if (gen_v9_scc (LT, operands))
if (gen_v9_scc (LT, operands))
DONE;
DONE;
...
@@ -950,13 +926,7 @@
...
@@ -950,13 +926,7 @@
"! TARGET_LIVE_G0"
"! TARGET_LIVE_G0"
"
"
{
{
if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
if (TARGET_V9)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, GE);
emit_insn (gen_sne (operands
[
0
]
));
DONE;
}
else if (TARGET_V9)
{
{
if (gen_v9_scc (GE, operands))
if (gen_v9_scc (GE, operands))
DONE;
DONE;
...
@@ -971,13 +941,7 @@
...
@@ -971,13 +941,7 @@
"! TARGET_LIVE_G0"
"! TARGET_LIVE_G0"
"
"
{
{
if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
if (TARGET_V9)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, LE);
emit_insn (gen_sne (operands
[
0
]
));
DONE;
}
else if (TARGET_V9)
{
{
if (gen_v9_scc (LE, operands))
if (gen_v9_scc (LE, operands))
DONE;
DONE;
...
@@ -1605,12 +1569,6 @@
...
@@ -1605,12 +1569,6 @@
emit_v9_brxx_insn (EQ, sparc_compare_op0, operands
[
0
]
);
emit_v9_brxx_insn (EQ, sparc_compare_op0, operands
[
0
]
);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, EQ);
emit_jump_insn (gen_bne (operands
[
0
]
));
DONE;
}
operands
[
1
]
= gen_compare_reg (EQ, sparc_compare_op0, sparc_compare_op1);
operands
[
1
]
= gen_compare_reg (EQ, sparc_compare_op0, sparc_compare_op1);
}")
}")
...
@@ -1629,12 +1587,6 @@
...
@@ -1629,12 +1587,6 @@
emit_v9_brxx_insn (NE, sparc_compare_op0, operands
[
0
]
);
emit_v9_brxx_insn (NE, sparc_compare_op0, operands
[
0
]
);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, NE);
emit_jump_insn (gen_bne (operands
[
0
]
));
DONE;
}
operands
[
1
]
= gen_compare_reg (NE, sparc_compare_op0, sparc_compare_op1);
operands
[
1
]
= gen_compare_reg (NE, sparc_compare_op0, sparc_compare_op1);
}")
}")
...
@@ -1653,12 +1605,6 @@
...
@@ -1653,12 +1605,6 @@
emit_v9_brxx_insn (GT, sparc_compare_op0, operands
[
0
]
);
emit_v9_brxx_insn (GT, sparc_compare_op0, operands
[
0
]
);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, GT);
emit_jump_insn (gen_bne (operands
[
0
]
));
DONE;
}
operands
[
1
]
= gen_compare_reg (GT, sparc_compare_op0, sparc_compare_op1);
operands
[
1
]
= gen_compare_reg (GT, sparc_compare_op0, sparc_compare_op1);
}")
}")
...
@@ -1687,12 +1633,6 @@
...
@@ -1687,12 +1633,6 @@
emit_v9_brxx_insn (LT, sparc_compare_op0, operands
[
0
]
);
emit_v9_brxx_insn (LT, sparc_compare_op0, operands
[
0
]
);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, LT);
emit_jump_insn (gen_bne (operands
[
0
]
));
DONE;
}
operands
[
1
]
= gen_compare_reg (LT, sparc_compare_op0, sparc_compare_op1);
operands
[
1
]
= gen_compare_reg (LT, sparc_compare_op0, sparc_compare_op1);
}")
}")
...
@@ -1721,12 +1661,6 @@
...
@@ -1721,12 +1661,6 @@
emit_v9_brxx_insn (GE, sparc_compare_op0, operands
[
0
]
);
emit_v9_brxx_insn (GE, sparc_compare_op0, operands
[
0
]
);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, GE);
emit_jump_insn (gen_bne (operands
[
0
]
));
DONE;
}
operands
[
1
]
= gen_compare_reg (GE, sparc_compare_op0, sparc_compare_op1);
operands
[
1
]
= gen_compare_reg (GE, sparc_compare_op0, sparc_compare_op1);
}")
}")
...
@@ -1755,12 +1689,6 @@
...
@@ -1755,12 +1689,6 @@
emit_v9_brxx_insn (LE, sparc_compare_op0, operands
[
0
]
);
emit_v9_brxx_insn (LE, sparc_compare_op0, operands
[
0
]
);
DONE;
DONE;
}
}
else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)
{
emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, LE);
emit_jump_insn (gen_bne (operands
[
0
]
));
DONE;
}
operands
[
1
]
= gen_compare_reg (LE, sparc_compare_op0, sparc_compare_op1);
operands
[
1
]
= gen_compare_reg (LE, sparc_compare_op0, sparc_compare_op1);
}")
}")
...
...
gcc/expr.h
View file @
c5c60e15
...
@@ -567,10 +567,6 @@ extern void emit_cmp_and_jump_insns PROTO((rtx, rtx, enum rtx_code, rtx,
...
@@ -567,10 +567,6 @@ extern void emit_cmp_and_jump_insns PROTO((rtx, rtx, enum rtx_code, rtx,
(without splitting it into pieces). */
(without splitting it into pieces). */
extern
int
can_compare_p
PROTO
((
enum
machine_mode
));
extern
int
can_compare_p
PROTO
((
enum
machine_mode
));
/* Emit a library call comparison between floating point X and Y.
COMPARISON is the rtl operator to compare with (EQ, NE, GT, etc.). */
extern
void
emit_float_lib_cmp
PROTO
((
rtx
,
rtx
,
enum
rtx_code
));
/* Generate code to indirectly jump to a location given in the rtx LOC. */
/* Generate code to indirectly jump to a location given in the rtx LOC. */
extern
void
emit_indirect_jump
PROTO
((
rtx
));
extern
void
emit_indirect_jump
PROTO
((
rtx
));
...
...
gcc/optabs.c
View file @
c5c60e15
...
@@ -270,11 +270,11 @@ static void init_traps PROTO((void));
...
@@ -270,11 +270,11 @@ static void init_traps PROTO((void));
static
int
cmp_available_p
PROTO
((
enum
machine_mode
,
enum
rtx_code
,
int
));
static
int
cmp_available_p
PROTO
((
enum
machine_mode
,
enum
rtx_code
,
int
));
static
void
emit_cmp_and_jump_insn_1
PROTO
((
rtx
,
rtx
,
enum
machine_mode
,
static
void
emit_cmp_and_jump_insn_1
PROTO
((
rtx
,
rtx
,
enum
machine_mode
,
enum
rtx_code
,
int
,
rtx
));
enum
rtx_code
,
int
,
rtx
));
static
void
prepare_cmp_insn
PROTO
((
rtx
*
,
rtx
*
,
enum
rtx_code
,
rtx
,
static
void
prepare_cmp_insn
PROTO
((
rtx
*
,
rtx
*
,
enum
rtx_code
*
,
rtx
,
enum
machine_mode
*
,
int
*
,
int
));
enum
machine_mode
*
,
int
*
,
int
));
static
rtx
prepare_operand
PROTO
((
int
,
rtx
,
int
,
enum
machine_mode
,
static
rtx
prepare_operand
PROTO
((
int
,
rtx
,
int
,
enum
machine_mode
,
enum
machine_mode
,
int
));
enum
machine_mode
,
int
));
static
void
prepare_float_lib_cmp
PROTO
((
rtx
*
,
rtx
*
,
enum
rtx_code
,
static
void
prepare_float_lib_cmp
PROTO
((
rtx
*
,
rtx
*
,
enum
rtx_code
*
,
enum
machine_mode
*
,
int
*
));
enum
machine_mode
*
,
int
*
));
/* Add a REG_EQUAL note to the last insn in SEQ. TARGET is being set to
/* Add a REG_EQUAL note to the last insn in SEQ. TARGET is being set to
...
@@ -3019,15 +3019,16 @@ cmp_available_p (mode, code, can_use_tst_p)
...
@@ -3019,15 +3019,16 @@ cmp_available_p (mode, code, can_use_tst_p)
The values which are passed in through pointers can be modified; the caller
The values which are passed in through pointers can be modified; the caller
should perform the comparison on the modified values. */
should perform the comparison on the modified values. */
void
static
void
prepare_cmp_insn
(
px
,
py
,
comparison
,
size
,
pmode
,
punsignedp
,
align
)
prepare_cmp_insn
(
px
,
py
,
p
comparison
,
size
,
pmode
,
punsignedp
,
align
)
rtx
*
px
,
*
py
;
rtx
*
px
,
*
py
;
enum
rtx_code
comparison
;
enum
rtx_code
*
p
comparison
;
rtx
size
;
rtx
size
;
enum
machine_mode
*
pmode
;
enum
machine_mode
*
pmode
;
int
*
punsignedp
;
int
*
punsignedp
;
int
align
;
int
align
;
{
{
enum
rtx_code
comparison
=
*
pcomparison
;
enum
machine_mode
mode
=
*
pmode
;
enum
machine_mode
mode
=
*
pmode
;
rtx
x
=
*
px
,
y
=
*
py
;
rtx
x
=
*
px
,
y
=
*
py
;
int
unsignedp
=
*
punsignedp
;
int
unsignedp
=
*
punsignedp
;
...
@@ -3181,7 +3182,7 @@ prepare_cmp_insn (px, py, comparison, size, pmode, punsignedp, align)
...
@@ -3181,7 +3182,7 @@ prepare_cmp_insn (px, py, comparison, size, pmode, punsignedp, align)
}
}
if
(
class
==
MODE_FLOAT
)
if
(
class
==
MODE_FLOAT
)
prepare_float_lib_cmp
(
px
,
py
,
comparison
,
pmode
,
punsignedp
);
prepare_float_lib_cmp
(
px
,
py
,
p
comparison
,
pmode
,
punsignedp
);
else
else
abort
();
abort
();
...
@@ -3322,7 +3323,7 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
...
@@ -3322,7 +3323,7 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
emit_queue
();
emit_queue
();
if
(
unsignedp
)
if
(
unsignedp
)
comparison
=
unsigned_condition
(
comparison
);
comparison
=
unsigned_condition
(
comparison
);
prepare_cmp_insn
(
&
op0
,
&
op1
,
comparison
,
size
,
&
mode
,
&
unsignedp
,
align
);
prepare_cmp_insn
(
&
op0
,
&
op1
,
&
comparison
,
size
,
&
mode
,
&
unsignedp
,
align
);
emit_cmp_and_jump_insn_1
(
op0
,
op1
,
mode
,
comparison
,
unsignedp
,
label
);
emit_cmp_and_jump_insn_1
(
op0
,
op1
,
mode
,
comparison
,
unsignedp
,
label
);
}
}
...
@@ -3360,13 +3361,14 @@ can_compare_p (mode)
...
@@ -3360,13 +3361,14 @@ can_compare_p (mode)
/* Emit a library call comparison between floating point X and Y.
/* Emit a library call comparison between floating point X and Y.
COMPARISON is the rtl operator to compare with (EQ, NE, GT, etc.). */
COMPARISON is the rtl operator to compare with (EQ, NE, GT, etc.). */
void
static
void
prepare_float_lib_cmp
(
px
,
py
,
comparison
,
pmode
,
punsignedp
)
prepare_float_lib_cmp
(
px
,
py
,
p
comparison
,
pmode
,
punsignedp
)
rtx
*
px
,
*
py
;
rtx
*
px
,
*
py
;
enum
rtx_code
comparison
;
enum
rtx_code
*
p
comparison
;
enum
machine_mode
*
pmode
;
enum
machine_mode
*
pmode
;
int
*
punsignedp
;
int
*
punsignedp
;
{
{
enum
rtx_code
comparison
=
*
pcomparison
;
rtx
x
=
*
px
,
y
=
*
py
;
rtx
x
=
*
px
,
y
=
*
py
;
enum
machine_mode
mode
=
GET_MODE
(
x
);
enum
machine_mode
mode
=
GET_MODE
(
x
);
rtx
libfunc
=
0
;
rtx
libfunc
=
0
;
...
@@ -3537,7 +3539,7 @@ prepare_float_lib_cmp (px, py, comparison, pmode, punsignedp)
...
@@ -3537,7 +3539,7 @@ prepare_float_lib_cmp (px, py, comparison, pmode, punsignedp)
y
=
protect_from_queue
(
y
,
0
);
y
=
protect_from_queue
(
y
,
0
);
*
px
=
convert_to_mode
(
wider_mode
,
x
,
0
);
*
px
=
convert_to_mode
(
wider_mode
,
x
,
0
);
*
py
=
convert_to_mode
(
wider_mode
,
y
,
0
);
*
py
=
convert_to_mode
(
wider_mode
,
y
,
0
);
prepare_float_lib_cmp
(
px
,
py
,
comparison
,
pmode
,
punsignedp
);
prepare_float_lib_cmp
(
px
,
py
,
p
comparison
,
pmode
,
punsignedp
);
return
;
return
;
}
}
}
}
...
@@ -3558,6 +3560,10 @@ prepare_float_lib_cmp (px, py, comparison, pmode, punsignedp)
...
@@ -3558,6 +3560,10 @@ prepare_float_lib_cmp (px, py, comparison, pmode, punsignedp)
*
px
=
result
;
*
px
=
result
;
*
py
=
const0_rtx
;
*
py
=
const0_rtx
;
*
pmode
=
word_mode
;
*
pmode
=
word_mode
;
#ifdef FLOAT_LIB_COMPARE_RETURNS_BOOL
if
(
FLOAT_LIB_COMPARE_RETURNS_BOOL
(
mode
,
comparison
))
*
pcomparison
=
NE
;
#endif
*
punsignedp
=
0
;
*
punsignedp
=
0
;
}
}
...
...
gcc/tm.texi
View file @
c5c60e15
...
@@ -4046,6 +4046,15 @@ Define this macro as a C statement that declares additional library
...
@@ -4046,6 +4046,15 @@ Define this macro as a C statement that declares additional library
routines
renames
existing
ones
.
@code
{
init_optabs
}
calls
this
macro
after
routines
renames
existing
ones
.
@code
{
init_optabs
}
calls
this
macro
after
initializing
all
the
normal
library
routines
.
initializing
all
the
normal
library
routines
.
@findex
FLOAT_LIB_COMPARE_RETURNS_BOOL
(
@var
{
mode
},
@var
{
comparison
})
@item
FLOAT_LIB_COMPARE_RETURNS_BOOL
Define
this
macro
as
a
C
statement
that
returns
nonzero
if
a
call
to
the
floating
point
comparison
library
function
will
return
a
boolean
value
that
indicates
the
result
of
the
comparison
.
It
should
return
zero
if
one
of
gcc
'
s
own
libgcc
functions
is
called
.
Most
ports
don
'
t
need
to
define
this
macro
.
@findex
TARGET_EDOM
@findex
TARGET_EDOM
@cindex
@code
{
EDOM
},
implicit
usage
@cindex
@code
{
EDOM
},
implicit
usage
@item
TARGET_EDOM
@item
TARGET_EDOM
...
...
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