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
fd930388
Commit
fd930388
authored
Sep 28, 2010
by
Richard Henderson
Committed by
Richard Henderson
Sep 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement TARGET_BUILTIN_DECL for alpha.
From-SVN: r164707
parent
6b79b1b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
24 deletions
+52
-24
gcc/ChangeLog
+7
-0
gcc/config/alpha/alpha.c
+45
-24
No files found.
gcc/ChangeLog
View file @
fd930388
2010-09-28 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_builtins): New.
(alpha_builtin_decl, TARGET_BUILTIN_DECL): New.
(alpha_builtin_function): New.
(alpha_add_builtins, alpha_init_builtins): Use it.
2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
* doc/standards.texi (Standards): Expanded the section on
* doc/standards.texi (Standards): Expanded the section on
gcc/config/alpha/alpha.c
View file @
fd930388
...
@@ -6634,6 +6634,36 @@ static GTY(()) tree alpha_v8qi_s;
...
@@ -6634,6 +6634,36 @@ static GTY(()) tree alpha_v8qi_s;
static
GTY
(())
tree
alpha_v4hi_u
;
static
GTY
(())
tree
alpha_v4hi_u
;
static
GTY
(())
tree
alpha_v4hi_s
;
static
GTY
(())
tree
alpha_v4hi_s
;
static
GTY
(())
tree
alpha_builtins
[(
int
)
ALPHA_BUILTIN_max
];
/* Return the alpha builtin for CODE. */
static
tree
alpha_builtin_decl
(
unsigned
code
,
bool
initialize_p
ATTRIBUTE_UNUSED
)
{
if
(
code
>=
ALPHA_BUILTIN_max
)
return
error_mark_node
;
return
alpha_builtins
[
code
];
}
/* Helper function of alpha_init_builtins. Add the built-in specified
by NAME, TYPE, CODE, and ECF. */
static
void
alpha_builtin_function
(
const
char
*
name
,
tree
ftype
,
enum
alpha_builtin
code
,
unsigned
ecf
)
{
tree
decl
=
add_builtin_function
(
name
,
ftype
,
(
int
)
code
,
BUILT_IN_MD
,
NULL
,
NULL_TREE
);
if
(
ecf
&
ECF_CONST
)
TREE_READONLY
(
decl
)
=
1
;
if
(
ecf
&
ECF_NOTHROW
)
TREE_NOTHROW
(
decl
)
=
1
;
alpha_builtins
[(
int
)
code
]
=
decl
;
}
/* Helper function of alpha_init_builtins. Add the COUNT built-in
/* Helper function of alpha_init_builtins. Add the COUNT built-in
functions pointed to by P, with function type FTYPE. */
functions pointed to by P, with function type FTYPE. */
...
@@ -6641,26 +6671,19 @@ static void
...
@@ -6641,26 +6671,19 @@ static void
alpha_add_builtins
(
const
struct
alpha_builtin_def
*
p
,
size_t
count
,
alpha_add_builtins
(
const
struct
alpha_builtin_def
*
p
,
size_t
count
,
tree
ftype
)
tree
ftype
)
{
{
tree
decl
;
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
count
;
++
i
,
++
p
)
for
(
i
=
0
;
i
<
count
;
++
i
,
++
p
)
if
((
target_flags
&
p
->
target_mask
)
==
p
->
target_mask
)
if
((
target_flags
&
p
->
target_mask
)
==
p
->
target_mask
)
{
alpha_builtin_function
(
p
->
name
,
ftype
,
p
->
code
,
decl
=
add_builtin_function
(
p
->
name
,
ftype
,
p
->
code
,
BUILT_IN_MD
,
(
p
->
is_const
?
ECF_CONST
:
0
)
|
ECF_NOTHROW
);
NULL
,
NULL
);
if
(
p
->
is_const
)
TREE_READONLY
(
decl
)
=
1
;
TREE_NOTHROW
(
decl
)
=
1
;
}
}
}
static
void
static
void
alpha_init_builtins
(
void
)
alpha_init_builtins
(
void
)
{
{
tree
dimode_integer_type_node
;
tree
dimode_integer_type_node
;
tree
ftype
,
decl
;
tree
ftype
;
dimode_integer_type_node
=
lang_hooks
.
types
.
type_for_mode
(
DImode
,
0
);
dimode_integer_type_node
=
lang_hooks
.
types
.
type_for_mode
(
DImode
,
0
);
...
@@ -6686,30 +6709,26 @@ alpha_init_builtins (void)
...
@@ -6686,30 +6709,26 @@ alpha_init_builtins (void)
ftype
);
ftype
);
ftype
=
build_function_type
(
ptr_type_node
,
void_list_node
);
ftype
=
build_function_type
(
ptr_type_node
,
void_list_node
);
decl
=
add_builtin_function
(
"__builtin_thread_pointer"
,
ftype
,
alpha_builtin_function
(
"__builtin_thread_pointer"
,
ftype
,
ALPHA_BUILTIN_THREAD_POINTER
,
BUILT_IN_MD
,
ALPHA_BUILTIN_THREAD_POINTER
,
ECF_NOTHROW
);
NULL
,
NULL
);
TREE_NOTHROW
(
decl
)
=
1
;
ftype
=
build_function_type_list
(
void_type_node
,
ptr_type_node
,
NULL_TREE
);
ftype
=
build_function_type_list
(
void_type_node
,
ptr_type_node
,
NULL_TREE
);
decl
=
add_builtin_function
(
"__builtin_set_thread_pointer"
,
ftype
,
alpha_builtin_function
(
"__builtin_set_thread_pointer"
,
ftype
,
ALPHA_BUILTIN_SET_THREAD_POINTER
,
BUILT_IN_MD
,
ALPHA_BUILTIN_SET_THREAD_POINTER
,
ECF_NOTHROW
);
NULL
,
NULL
);
TREE_NOTHROW
(
decl
)
=
1
;
if
(
TARGET_ABI_OPEN_VMS
)
if
(
TARGET_ABI_OPEN_VMS
)
{
{
ftype
=
build_function_type_list
(
ptr_type_node
,
ptr_type_node
,
ftype
=
build_function_type_list
(
ptr_type_node
,
ptr_type_node
,
NULL_TREE
);
NULL_TREE
);
add_builtin_function
(
"__builtin_establish_vms_condition_handler"
,
ftype
,
alpha_builtin_function
(
"__builtin_establish_vms_condition_handler"
,
ALPHA_BUILTIN_ESTABLISH_VMS_CONDITION_HANDLER
,
ftype
,
BUILT_IN_MD
,
NULL
,
NULL_TREE
);
ALPHA_BUILTIN_ESTABLISH_VMS_CONDITION_HANDLER
,
0
);
ftype
=
build_function_type_list
(
ptr_type_node
,
void_type_node
,
ftype
=
build_function_type_list
(
ptr_type_node
,
void_type_node
,
NULL_TREE
);
NULL_TREE
);
add_builtin_function
(
"__builtin_revert_vms_condition_handler"
,
ftype
,
alpha_builtin_function
(
"__builtin_revert_vms_condition_handler"
,
ftype
,
ALPHA_BUILTIN_REVERT_VMS_CONDITION_HANDLER
,
ALPHA_BUILTIN_REVERT_VMS_CONDITION_HANDLER
,
0
);
BUILT_IN_MD
,
NULL
,
NULL_TREE
);
}
}
alpha_v8qi_u
=
build_vector_type
(
unsigned_intQI_type_node
,
8
);
alpha_v8qi_u
=
build_vector_type
(
unsigned_intQI_type_node
,
8
);
...
@@ -11082,6 +11101,8 @@ alpha_init_libfuncs (void)
...
@@ -11082,6 +11101,8 @@ alpha_init_libfuncs (void)
#undef TARGET_HAVE_TLS
#undef TARGET_HAVE_TLS
#define TARGET_HAVE_TLS HAVE_AS_TLS
#define TARGET_HAVE_TLS HAVE_AS_TLS
#undef TARGET_BUILTIN_DECL
#define TARGET_BUILTIN_DECL alpha_builtin_decl
#undef TARGET_INIT_BUILTINS
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS alpha_init_builtins
#define TARGET_INIT_BUILTINS alpha_init_builtins
#undef TARGET_EXPAND_BUILTIN
#undef TARGET_EXPAND_BUILTIN
...
...
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