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
10d5c73f
Commit
10d5c73f
authored
Jun 18, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(override_options): Allow EV4/5 or 21064/21164 for cpu.
Clean up handling of floating-point options. From-SVN: r12300
parent
d6c46142
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
60 deletions
+43
-60
gcc/config/alpha/alpha.c
+43
-60
No files found.
gcc/config/alpha/alpha.c
View file @
10d5c73f
...
...
@@ -97,16 +97,18 @@ static void add_long_const PROTO((FILE *, HOST_WIDE_INT, int, int, int));
void
override_options
()
{
alpha_cpu
=
TARGET_CPU_DEFAULT
;
alpha_cpu
=
PROCESSOR_EV4
;
if
(
alpha_cpu_string
)
{
if
(
alpha_cpu_string
[
0
]
==
'e'
&&
alpha_cpu_string
[
1
]
==
'v'
&&
(
alpha_cpu_string
[
2
]
==
'4'
||
alpha_cpu_string
[
2
]
==
'5'
))
alpha_cpu
=
alpha_cpu_string
[
2
]
==
'4'
?
PROCESSOR_EV4
:
PROCESSOR_EV5
;
if
(
!
strcmp
(
alpha_cpu_string
,
"ev4"
)
||
!
strcmp
(
alpha_cpu_string
,
"21064"
))
alpha_cpu
=
PROCESSOR_EV4
;
else
if
(
!
strcmp
(
alpha_cpu_string
,
"ev5"
)
||
!
strcmp
(
alpha_cpu_string
,
"21164"
))
alpha_cpu
=
PROCESSOR_EV5
;
else
error
(
"bad value (%s) for -mcpu switch"
,
alpha_cpu_string
);
error
(
"bad value `%s' for -mcpu switch"
,
alpha_cpu_string
);
}
alpha_tp
=
ALPHA_TP_PROG
;
...
...
@@ -115,82 +117,63 @@ override_options ()
if
(
TARGET_IEEE
)
{
alpha_tp_string
=
"i"
;
alpha_fptm_string
=
"su"
;
target_flags
|=
MASK_IEEE_CONFORMANT
;
alpha_tp
=
ALPHA_TP_INSN
;
alpha_fptm
=
ALPHA_FPTM_SU
;
}
if
(
TARGET_IEEE_WITH_INEXACT
)
{
alpha_tp_string
=
"i"
;
alpha_fptm_string
=
"sui"
;
target_flags
|=
MASK_IEEE_CONFORMANT
;
alpha_tp
=
ALPHA_TP_INSN
;
alpha_fptm
=
ALPHA_FPTM_SUI
;
}
if
(
alpha_tp_string
)
switch
(
alpha_tp_string
[
0
])
{
case
'p'
:
{
if
(
!
strcmp
(
alpha_tp_string
,
"p"
))
alpha_tp
=
ALPHA_TP_PROG
;
break
;
case
'f'
:
else
if
(
!
strcmp
(
alpha_tp_string
,
"f"
))
alpha_tp
=
ALPHA_TP_FUNC
;
break
;
case
'i'
:
else
if
(
!
strcmp
(
alpha_tp_string
,
"i"
))
alpha_tp
=
ALPHA_TP_INSN
;
break
;
default
:
error
(
"bad value (%s) for -mtrap-precision switch"
,
alpha_tp_string
);
break
;
}
else
error
(
"bad value `%s' for -mtrap-precision switch"
,
alpha_tp_string
);
}
if
(
alpha_fprm_string
)
switch
(
alpha_fprm_string
[
0
])
{
case
'n'
:
{
if
(
!
strcmp
(
alpha_fprm_string
,
"n"
))
alpha_fprm
=
ALPHA_FPRM_NORM
;
break
;
case
'm'
:
else
if
(
!
strcmp
(
alpha_fprm_string
,
"m"
))
alpha_fprm
=
ALPHA_FPRM_MINF
;
break
;
case
'c'
:
else
if
(
!
strcmp
(
alpha_fprm_string
,
"c"
))
alpha_fprm
=
ALPHA_FPRM_CHOP
;
break
;
case
'd'
:
else
if
(
!
strcmp
(
alpha_fprm_string
,
"d"
))
alpha_fprm
=
ALPHA_FPRM_DYN
;
break
;
default
:
error
(
"bad value (%s) for -mfp-rounding-mode switch"
,
else
error
(
"bad value `%s' for -mfp-rounding-mode switch"
,
alpha_fprm_string
);
break
;
}
}
if
(
alpha_fptm_string
)
if
(
strcmp
(
alpha_fptm_string
,
"n"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_N
;
else
if
(
strcmp
(
alpha_fptm_string
,
"u"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_U
;
else
if
(
strcmp
(
alpha_fptm_string
,
"su"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_SU
;
else
if
(
strcmp
(
alpha_fptm_string
,
"sui"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_SUI
;
else
error
(
"bad value (%s) for -mfp-trap-mode switch"
,
alpha_fptm_string
);
{
if
(
strcmp
(
alpha_fptm_string
,
"n"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_N
;
else
if
(
strcmp
(
alpha_fptm_string
,
"u"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_U
;
else
if
(
strcmp
(
alpha_fptm_string
,
"su"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_SU
;
else
if
(
strcmp
(
alpha_fptm_string
,
"sui"
)
==
0
)
alpha_fptm
=
ALPHA_FPTM_SUI
;
else
error
(
"bad value `%s' for -mfp-trap-mode switch"
,
alpha_fptm_string
);
}
/* Do some sanity checks on the above option. */
if
(
alpha_fptm
>=
ALPHA_FPTM_SU
&&
alpha_tp
!=
ALPHA_TP_INSN
)
if
((
alpha_fptm
==
ALPHA_FPTM_SU
||
alpha_fptm
==
ALPHA_FPTM_SUI
)
&&
alpha_tp
!=
ALPHA_TP_INSN
)
{
error
(
"fp software completion requires -mtrap-precision=i"
);
warning
(
"fp software completion requires -mtrap-precision=i"
);
alpha_tp
=
ALPHA_TP_INSN
;
}
}
...
...
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