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
5c4d7cfb
Commit
5c4d7cfb
authored
Oct 18, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(store_field): If signed bitfield and want value, sign extend.
From-SVN: r2504
parent
ca3e4a2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
gcc/expr.c
+10
-1
No files found.
gcc/expr.c
View file @
5c4d7cfb
...
@@ -2702,7 +2702,16 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
...
@@ -2702,7 +2702,16 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
/* If possible, avoid refetching from the bitfield itself. */
/* If possible, avoid refetching from the bitfield itself. */
if
(
width_mask
!=
0
if
(
width_mask
!=
0
&&
!
(
GET_CODE
(
target
)
==
MEM
&&
MEM_VOLATILE_P
(
target
)))
&&
!
(
GET_CODE
(
target
)
==
MEM
&&
MEM_VOLATILE_P
(
target
)))
return
expand_and
(
temp
,
GEN_INT
(
width_mask
),
NULL_RTX
);
{
rtx
count
;
enum
machine_mode
tmode
;
if
(
unsignedp
)
return
expand_and
(
temp
,
GEN_INT
(
width_mask
),
NULL_RTX
);
tmode
=
GET_MODE
(
temp
);
count
=
build_int_2
(
GET_MODE_BITSIZE
(
tmode
)
-
bitsize
,
0
);
temp
=
expand_shift
(
LSHIFT_EXPR
,
tmode
,
temp
,
count
,
0
,
0
);
return
expand_shift
(
RSHIFT_EXPR
,
tmode
,
temp
,
count
,
0
,
0
);
}
return
extract_bit_field
(
target
,
bitsize
,
bitpos
,
unsignedp
,
return
extract_bit_field
(
target
,
bitsize
,
bitpos
,
unsignedp
,
NULL_RTX
,
value_mode
,
0
,
align
,
NULL_RTX
,
value_mode
,
0
,
align
,
total_size
);
total_size
);
...
...
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