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
c02bd5d9
Commit
c02bd5d9
authored
Sep 22, 1993
by
Jan Brittenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bytecode fixes
From-SVN: r5402
parent
e9b7093a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
10 deletions
+37
-10
gcc/expr.c
+27
-8
gcc/varasm.c
+10
-2
No files found.
gcc/expr.c
View file @
c02bd5d9
...
...
@@ -120,6 +120,16 @@ struct move_by_pieces
int
reverse
;
};
/* Used to generate bytecodes: keep track of size of local variables,
as well as depth of arithmetic stack. (Notice that variables are
stored on the machine's stack, not the arithmetic stack.) */
int
local_vars_size
;
extern
int
stack_depth
;
extern
int
max_stack_depth
;
struct
obstack
permanent_obstack
;
static
rtx
enqueue_insn
PROTO
((
rtx
,
rtx
));
static
int
queued_subexp_p
PROTO
((
rtx
));
static
void
init_queue
PROTO
((
void
));
...
...
@@ -5754,11 +5764,17 @@ bc_expand_expr (exp)
case
REAL_CST
:
#if 0
#ifdef DEBUG_PRINT_CODE
fprintf (stderr, " [%g]\n", (double) TREE_INT_CST_LOW (exp));
#endif
/* FIX THIS: find a better way to pass real_cst's. -bson */
bc_emit_instruction (mode_to_const_map[TYPE_MODE (TREE_TYPE (exp))],
(double) TREE_REAL_CST (exp));
#else
abort
();
#endif
return
;
case
CALL_EXPR
:
...
...
@@ -5875,7 +5891,7 @@ bc_expand_expr (exp)
case
MODIFY_EXPR
:
expand_assignment
(
TREE_
TYPE
(
exp
),
TREE_OPERAND
(
exp
,
0
),
TREE_OPERAND
(
exp
,
1
)
);
expand_assignment
(
TREE_
OPERAND
(
exp
,
0
),
TREE_OPERAND
(
exp
,
1
),
0
,
0
);
return
;
case
ADDR_EXPR
:
...
...
@@ -5914,7 +5930,7 @@ bc_expand_expr (exp)
bc_expand_expr
(
TREE_OPERAND
(
exp
,
0
));
bc_expand_truth_conversion
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
)));
lab
=
bc_get_bytecode_label
();
bc_emit_bytecode
(
jumpifnot
);
bc_emit_bytecode
(
x
jumpifnot
);
bc_emit_bytecode_labelref
(
lab
);
#ifdef DEBUG_PRINT_CODE
...
...
@@ -5936,12 +5952,12 @@ bc_expand_expr (exp)
case
TRUTH_ANDIF_EXPR
:
opcode
=
jumpifnot
;
opcode
=
x
jumpifnot
;
goto
andorif
;
case
TRUTH_ORIF_EXPR
:
opcode
=
jumpif
;
opcode
=
x
jumpif
;
goto
andorif
;
case
PLUS_EXPR
:
...
...
@@ -6186,10 +6202,10 @@ bc_expand_expr (exp)
bc_expand_conversion
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
1
)),
type
);
/* Push the address of the lvalue */
expand_expr
(
build1
(
ADDR_EXPR
,
TYPE_POINTER_TO
(
type
),
TREE_OPERAND
(
exp
,
0
)));
bc_
expand_expr
(
build1
(
ADDR_EXPR
,
TYPE_POINTER_TO
(
type
),
TREE_OPERAND
(
exp
,
0
)));
/* Perform actual increment */
expand_increment
(
incroptab
,
type
);
bc_
expand_increment
(
incroptab
,
type
);
return
;
}
...
...
@@ -7634,7 +7650,10 @@ expand_increment (exp, post)
int
single_insn
=
0
;
if
(
output_bytecode
)
return
bc_expand_increment
(
exp
,
post
);
{
bc_expand_expr
(
exp
);
return
NULL_RTX
;
}
/* Stabilize any component ref that might need to be
evaluated more than once below. */
...
...
@@ -9198,7 +9217,7 @@ bc_expand_component_address (exp)
break
;
}
expand_expr
(
tem
);
bc_
expand_expr
(
tem
);
/* For bitfields also push their offset and size */
...
...
gcc/varasm.c
View file @
c02bd5d9
...
...
@@ -2516,9 +2516,13 @@ output_constant_def_contents (exp, reloc, labelno)
if
(
align
>
BITS_PER_UNIT
)
{
if
(
!
output_bytecode
)
ASM_OUTPUT_ALIGN
(
asm_out_file
,
floor_log2
(
align
/
BITS_PER_UNIT
));
{
ASM_OUTPUT_ALIGN
(
asm_out_file
,
floor_log2
(
align
/
BITS_PER_UNIT
));
}
else
BC_OUTPUT_ALIGN
(
asm_out_file
,
floor_log2
(
align
/
BITS_PER_UNIT
));
{
BC_OUTPUT_ALIGN
(
asm_out_file
,
floor_log2
(
align
/
BITS_PER_UNIT
));
}
}
/* Output the label itself. */
...
...
@@ -3613,6 +3617,8 @@ output_constructor (exp, size)
}
#ifdef HANDLE_SYSV_PRAGMA
/* Output asm to handle ``#pragma weak'' */
void
handle_pragma_weak
(
what
,
asm_out_file
,
name
,
value
)
...
...
@@ -3650,3 +3656,5 @@ handle_pragma_weak (what, asm_out_file, name, value)
else
if
(
!
(
what
==
ps_done
||
what
==
ps_start
))
warning
(
"malformed `#pragma weak'"
);
}
#endif
/* HANDLE_SYSV_PRAGMA */
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