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
e98f90d3
Commit
e98f90d3
authored
Nov 20, 2001
by
Geoffrey Keating
Committed by
Geoffrey Keating
Nov 20, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* expmed.c (extract_bit_field): Don't create invalid SUBREGs.
From-SVN: r47196
parent
34806eda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
gcc/ChangeLog
+4
-0
gcc/expmed.c
+13
-8
No files found.
gcc/ChangeLog
View file @
e98f90d3
2001
-
11
-
19
Geoffrey
Keating
<
geoffk
@redhat
.
com
>
*
expmed
.
c
(
extract_bit_field
)
:
Don
'
t
create
invalid
SUBREGs
.
2001
-
11
-
19
Zack
Weinberg
<
zack
@codesourcery
.
com
>
*
mkconfig
.
sh
:
Undefine
ENABLE_NLS
if
GENERATOR_FILE
is
...
...
gcc/expmed.c
View file @
e98f90d3
...
...
@@ -998,6 +998,8 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
enum
machine_mode
int_mode
;
enum
machine_mode
extv_mode
=
mode_for_extraction
(
EP_extv
,
0
);
enum
machine_mode
extzv_mode
=
mode_for_extraction
(
EP_extzv
,
0
);
enum
machine_mode
mode1
;
int
byte_offset
;
/* Discount the part of the structure before the desired byte.
We need to know how many bytes are safe to reference after it. */
...
...
@@ -1071,9 +1073,18 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
So too extracting a subword value in
the least significant part of the register. */
byte_offset
=
(
bitnum
%
BITS_PER_WORD
)
/
BITS_PER_UNIT
+
(
offset
*
UNITS_PER_WORD
);
mode1
=
(
VECTOR_MODE_P
(
tmode
)
?
mode
:
mode_for_size
(
bitsize
,
GET_MODE_CLASS
(
tmode
),
0
));
if
(((
GET_CODE
(
op0
)
!=
MEM
&&
TRULY_NOOP_TRUNCATION
(
GET_MODE_BITSIZE
(
mode
),
GET_MODE_BITSIZE
(
GET_MODE
(
op0
))))
GET_MODE_BITSIZE
(
GET_MODE
(
op0
)))
&&
GET_MODE_SIZE
(
mode1
)
!=
0
&&
byte_offset
%
GET_MODE_SIZE
(
mode1
)
==
0
)
||
(
GET_CODE
(
op0
)
==
MEM
&&
(
!
SLOW_UNALIGNED_ACCESS
(
mode
,
MEM_ALIGN
(
op0
))
||
(
offset
*
BITS_PER_UNIT
%
bitsize
==
0
...
...
@@ -1089,10 +1100,6 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
?
bitpos
+
bitsize
==
BITS_PER_WORD
:
bitpos
==
0
))))
{
enum
machine_mode
mode1
=
(
VECTOR_MODE_P
(
tmode
)
?
mode
:
mode_for_size
(
bitsize
,
GET_MODE_CLASS
(
tmode
),
0
));
if
(
mode1
!=
GET_MODE
(
op0
))
{
if
(
GET_CODE
(
op0
)
==
SUBREG
)
...
...
@@ -1108,9 +1115,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
abort
();
}
if
(
GET_CODE
(
op0
)
==
REG
)
op0
=
gen_rtx_SUBREG
(
mode1
,
op0
,
(
bitnum
%
BITS_PER_WORD
)
/
BITS_PER_UNIT
+
(
offset
*
UNITS_PER_WORD
));
op0
=
gen_rtx_SUBREG
(
mode1
,
op0
,
byte_offset
);
else
op0
=
adjust_address
(
op0
,
mode1
,
offset
);
}
...
...
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