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
5ab2f7b7
Commit
5ab2f7b7
authored
Nov 17, 2002
by
Kazu Hirata
Committed by
Kazu Hirata
Nov 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* builtins.c: Fix formatting.
From-SVN: r59194
parent
7b8dbd50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
38 deletions
+45
-38
gcc/ChangeLog
+4
-0
gcc/builtins.c
+41
-38
No files found.
gcc/ChangeLog
View file @
5ab2f7b7
2002
-
11
-
17
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
builtins
.
c
:
Fix
formatting
.
2002
-
11
-
16
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
2002
-
11
-
16
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
config
/
h8300
/
h8300
.
md
(
two
anonymous
patterns
)
:
Fix
typos
.
*
config
/
h8300
/
h8300
.
md
(
two
anonymous
patterns
)
:
Fix
typos
.
...
...
gcc/builtins.c
View file @
5ab2f7b7
...
@@ -790,10 +790,10 @@ expand_builtin_prefetch (arglist)
...
@@ -790,10 +790,10 @@ expand_builtin_prefetch (arglist)
#ifdef HAVE_prefetch
#ifdef HAVE_prefetch
if
(
HAVE_prefetch
)
if
(
HAVE_prefetch
)
{
{
if
((
!
(
*
insn_data
[(
int
)
CODE_FOR_prefetch
].
operand
[
0
].
predicate
)
if
((
!
(
*
insn_data
[(
int
)
CODE_FOR_prefetch
].
operand
[
0
].
predicate
)
(
op0
,
(
op0
,
insn_data
[(
int
)
CODE_FOR_prefetch
].
operand
[
0
].
mode
))
||
insn_data
[(
int
)
CODE_FOR_prefetch
].
operand
[
0
].
mode
))
(
GET_MODE
(
op0
)
!=
Pmode
))
||
(
GET_MODE
(
op0
)
!=
Pmode
))
{
{
#ifdef POINTERS_EXTEND_UNSIGNED
#ifdef POINTERS_EXTEND_UNSIGNED
if
(
GET_MODE
(
op0
)
!=
Pmode
)
if
(
GET_MODE
(
op0
)
!=
Pmode
)
...
@@ -806,10 +806,10 @@ expand_builtin_prefetch (arglist)
...
@@ -806,10 +806,10 @@ expand_builtin_prefetch (arglist)
else
else
#endif
#endif
op0
=
protect_from_queue
(
op0
,
0
);
op0
=
protect_from_queue
(
op0
,
0
);
/* Don't do anything with direct references to volatile memory, but
/* Don't do anything with direct references to volatile memory, but
generate code to handle other side effects. */
generate code to handle other side effects. */
if
(
GET_CODE
(
op0
)
!=
MEM
&&
side_effects_p
(
op0
))
if
(
GET_CODE
(
op0
)
!=
MEM
&&
side_effects_p
(
op0
))
emit_insn
(
op0
);
emit_insn
(
op0
);
}
}
/* Get a MEM rtx for expression EXP which is the address of an operand
/* Get a MEM rtx for expression EXP which is the address of an operand
...
@@ -833,7 +833,7 @@ get_memory_rtx (exp)
...
@@ -833,7 +833,7 @@ get_memory_rtx (exp)
If it is an ADDR_EXPR, use the operand. Otherwise, dereference it if
If it is an ADDR_EXPR, use the operand. Otherwise, dereference it if
we can. First remove any nops. */
we can. First remove any nops. */
while
((
TREE_CODE
(
exp
)
==
NOP_EXPR
||
TREE_CODE
(
exp
)
==
CONVERT_EXPR
while
((
TREE_CODE
(
exp
)
==
NOP_EXPR
||
TREE_CODE
(
exp
)
==
CONVERT_EXPR
||
TREE_CODE
(
exp
)
==
NON_LVALUE_EXPR
)
||
TREE_CODE
(
exp
)
==
NON_LVALUE_EXPR
)
&&
POINTER_TYPE_P
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
))))
&&
POINTER_TYPE_P
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
))))
exp
=
TREE_OPERAND
(
exp
,
0
);
exp
=
TREE_OPERAND
(
exp
,
0
);
...
@@ -887,7 +887,7 @@ apply_args_register_offset (regno)
...
@@ -887,7 +887,7 @@ apply_args_register_offset (regno)
/* Arguments are always put in outgoing registers (in the argument
/* Arguments are always put in outgoing registers (in the argument
block) if such make sense. */
block) if such make sense. */
#ifdef OUTGOING_REGNO
#ifdef OUTGOING_REGNO
regno
=
OUTGOING_REGNO
(
regno
);
regno
=
OUTGOING_REGNO
(
regno
);
#endif
#endif
return
apply_args_reg_offset
[
regno
];
return
apply_args_reg_offset
[
regno
];
}
}
...
@@ -1014,7 +1014,7 @@ apply_result_size ()
...
@@ -1014,7 +1014,7 @@ apply_result_size ()
mode
=
GET_MODE_WIDER_MODE
(
mode
))
mode
=
GET_MODE_WIDER_MODE
(
mode
))
if
(
HARD_REGNO_MODE_OK
(
regno
,
mode
)
if
(
HARD_REGNO_MODE_OK
(
regno
,
mode
)
&&
have_insn_for
(
SET
,
mode
))
&&
have_insn_for
(
SET
,
mode
))
best_mode
=
mode
;
best_mode
=
mode
;
if
(
best_mode
==
VOIDmode
)
if
(
best_mode
==
VOIDmode
)
for
(
mode
=
GET_CLASS_NARROWEST_MODE
(
MODE_VECTOR_INT
);
for
(
mode
=
GET_CLASS_NARROWEST_MODE
(
MODE_VECTOR_INT
);
...
@@ -1262,7 +1262,7 @@ expand_builtin_apply (function, arguments, argsize)
...
@@ -1262,7 +1262,7 @@ expand_builtin_apply (function, arguments, argsize)
emit_move_insn
(
value
,
adjust_address
(
arguments
,
Pmode
,
size
));
emit_move_insn
(
value
,
adjust_address
(
arguments
,
Pmode
,
size
));
emit_move_insn
(
struct_value_rtx
,
value
);
emit_move_insn
(
struct_value_rtx
,
value
);
if
(
GET_CODE
(
struct_value_rtx
)
==
REG
)
if
(
GET_CODE
(
struct_value_rtx
)
==
REG
)
use_reg
(
&
call_fusage
,
struct_value_rtx
);
use_reg
(
&
call_fusage
,
struct_value_rtx
);
size
+=
GET_MODE_SIZE
(
Pmode
);
size
+=
GET_MODE_SIZE
(
Pmode
);
}
}
...
@@ -1652,7 +1652,7 @@ expand_builtin_strlen (exp, target)
...
@@ -1652,7 +1652,7 @@ expand_builtin_strlen (exp, target)
/* Mark the beginning of the strlen sequence so we can emit the
/* Mark the beginning of the strlen sequence so we can emit the
source operand later. */
source operand later. */
before_strlen
=
get_last_insn
();
before_strlen
=
get_last_insn
();
char_rtx
=
const0_rtx
;
char_rtx
=
const0_rtx
;
char_mode
=
insn_data
[(
int
)
icode
].
operand
[
2
].
mode
;
char_mode
=
insn_data
[(
int
)
icode
].
operand
[
2
].
mode
;
...
@@ -2179,14 +2179,14 @@ builtin_memset_gen_str (data, offset, mode)
...
@@ -2179,14 +2179,14 @@ builtin_memset_gen_str (data, offset, mode)
char
*
p
;
char
*
p
;
size
=
GET_MODE_SIZE
(
mode
);
size
=
GET_MODE_SIZE
(
mode
);
if
(
size
==
1
)
if
(
size
==
1
)
return
(
rtx
)
data
;
return
(
rtx
)
data
;
p
=
alloca
(
size
);
p
=
alloca
(
size
);
memset
(
p
,
1
,
size
);
memset
(
p
,
1
,
size
);
coeff
=
c_readstr
(
p
,
mode
);
coeff
=
c_readstr
(
p
,
mode
);
target
=
convert_to_mode
(
mode
,
(
rtx
)
data
,
1
);
target
=
convert_to_mode
(
mode
,
(
rtx
)
data
,
1
);
target
=
expand_mult
(
mode
,
target
,
coeff
,
NULL_RTX
,
1
);
target
=
expand_mult
(
mode
,
target
,
coeff
,
NULL_RTX
,
1
);
return
force_reg
(
mode
,
target
);
return
force_reg
(
mode
,
target
);
}
}
...
@@ -2257,7 +2257,7 @@ expand_builtin_memset (exp, target, mode)
...
@@ -2257,7 +2257,7 @@ expand_builtin_memset (exp, target, mode)
dest_mem
=
get_memory_rtx
(
dest
);
dest_mem
=
get_memory_rtx
(
dest
);
store_by_pieces
(
dest_mem
,
tree_low_cst
(
len
,
1
),
store_by_pieces
(
dest_mem
,
tree_low_cst
(
len
,
1
),
builtin_memset_gen_str
,
builtin_memset_gen_str
,
(
PTR
)
val_rtx
,
dest_align
);
(
PTR
)
val_rtx
,
dest_align
);
dest_mem
=
force_operand
(
XEXP
(
dest_mem
,
0
),
NULL_RTX
);
dest_mem
=
force_operand
(
XEXP
(
dest_mem
,
0
),
NULL_RTX
);
#ifdef POINTERS_EXTEND_UNSIGNED
#ifdef POINTERS_EXTEND_UNSIGNED
if
(
GET_MODE
(
dest_mem
)
!=
ptr_mode
)
if
(
GET_MODE
(
dest_mem
)
!=
ptr_mode
)
...
@@ -3241,7 +3241,7 @@ expand_builtin_va_end (arglist)
...
@@ -3241,7 +3241,7 @@ expand_builtin_va_end (arglist)
#ifdef EXPAND_BUILTIN_VA_END
#ifdef EXPAND_BUILTIN_VA_END
valist
=
stabilize_va_list
(
valist
,
0
);
valist
=
stabilize_va_list
(
valist
,
0
);
EXPAND_BUILTIN_VA_END
(
arglist
);
EXPAND_BUILTIN_VA_END
(
arglist
);
#else
#else
/* Evaluate for side effects, if needed. I hate macros that don't
/* Evaluate for side effects, if needed. I hate macros that don't
do that. */
do that. */
...
@@ -4257,29 +4257,32 @@ validate_arglist VPARAMS ((tree arglist, ...))
...
@@ -4257,29 +4257,32 @@ validate_arglist VPARAMS ((tree arglist, ...))
VA_OPEN
(
ap
,
arglist
);
VA_OPEN
(
ap
,
arglist
);
VA_FIXEDARG
(
ap
,
tree
,
arglist
);
VA_FIXEDARG
(
ap
,
tree
,
arglist
);
do
{
do
code
=
va_arg
(
ap
,
enum
tree_code
);
switch
(
code
)
{
{
case
0
:
code
=
va_arg
(
ap
,
enum
tree_code
);
/* This signifies an ellipses, any further arguments are all ok. */
switch
(
code
)
res
=
1
;
{
goto
end
;
case
0
:
case
VOID_TYPE
:
/* This signifies an ellipses, any further arguments are all ok. */
/* This signifies an endlink, if no arguments remain, return
res
=
1
;
true, otherwise return false. */
goto
end
;
res
=
arglist
==
0
;
case
VOID_TYPE
:
goto
end
;
/* This signifies an endlink, if no arguments remain, return
default
:
true, otherwise return false. */
/* If no parameters remain or the parameter's code does not
res
=
arglist
==
0
;
match the specified code, return false. Otherwise continue
goto
end
;
checking any remaining arguments. */
default
:
if
(
arglist
==
0
||
code
!=
TREE_CODE
(
TREE_TYPE
(
TREE_VALUE
(
arglist
))))
/* If no parameters remain or the parameter's code does not
goto
end
;
match the specified code, return false. Otherwise continue
break
;
checking any remaining arguments. */
if
(
arglist
==
0
||
code
!=
TREE_CODE
(
TREE_TYPE
(
TREE_VALUE
(
arglist
))))
goto
end
;
break
;
}
arglist
=
TREE_CHAIN
(
arglist
);
}
}
arglist
=
TREE_CHAIN
(
arglist
);
while
(
1
);
}
while
(
1
);
/* We need gotos here since we can only have one VA_CLOSE in a
/* We need gotos here since we can only have one VA_CLOSE in a
function. */
function. */
...
...
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