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
354b734b
Commit
354b734b
authored
Jan 25, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Windows NT problem
From-SVN: r11105
parent
e98bb982
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
17 deletions
+29
-17
gcc/config/rs6000/rs6000.h
+11
-9
gcc/config/rs6000/rs6000.md
+18
-8
No files found.
gcc/config/rs6000/rs6000.h
View file @
354b734b
...
...
@@ -1774,17 +1774,15 @@ typedef struct rs6000_args
{ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == REG \
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
&& (unsigned) (INTVAL (XEXP (X, 1)) + 0x8000) >= 0x10000) \
{ int high_int, low_int; \
high_int = INTVAL (XEXP (X, 1)) >> 16; \
{ HOST_WIDE_INT high_int, low_int; \
rtx sum; \
high_int = INTVAL (XEXP (X, 1)) & (~ (HOST_WIDE_INT) 0xffff); \
low_int = INTVAL (XEXP (X, 1)) & 0xffff; \
if (low_int & 0x8000) \
high_int += 1, low_int |= 0xffff0000; \
(X) = gen_rtx (PLUS, Pmode, \
force_operand \
(gen_rtx (PLUS, Pmode, XEXP (X, 0), \
gen_rtx (CONST_INT, VOIDmode, \
high_int << 16)), 0), \
gen_rtx (CONST_INT, VOIDmode, low_int)); \
high_int += 0x10000, low_int |= ((HOST_WIDE_INT) -1) << 16; \
sum = force_operand (gen_rtx (PLUS, Pmode, XEXP (X, 0), \
GEN_INT (high_int)), 0); \
(X) = gen_rtx (PLUS, Pmode, sum, GEN_INT (low_int)); \
goto WIN; \
} \
else if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == REG \
...
...
@@ -2772,6 +2770,10 @@ do { \
(no need to use the default) */
#define MACHINE_issue_rate
/* General optimization flags. */
extern
int
optimize
;
extern
int
flag_expensive_optimizations
;
/* Declare functions in rs6000.c */
extern
void
output_options
();
extern
void
rs6000_override_options
();
...
...
gcc/config/rs6000/rs6000.md
View file @
354b734b
...
...
@@ -4780,20 +4780,30 @@
if (sym && GET_CODE (const_term) == CONST_INT
&& (GET_CODE (sym) == SYMBOL_REF || GET_CODE (sym) == LABEL_REF))
{
emit_insn (gen_movsi (operands
[
0
]
, sym));
unsigned HOST_WIDE_INT value = INTVAL (const_term);
int new_reg_p = (flag_expensive_optimizations
&& !reload_completed
&& !reload_in_progress);
rtx tmp1 = (new_reg_p && value != 0) ? gen_reg_rtx (SImode) : operands
[
0
]
;
emit_insn (gen_movsi (tmp1, sym));
if (INTVAL (const_term) != 0)
{
unsigned HOST_WIDE_INT value = INTVAL (const_term);
if (value + 0x8000 < 0x10000)
emit_insn (gen_addsi3 (operands
[
0
]
, operands
[
0
]
, GEN_INT (value)));
emit_insn (gen_addsi3 (operands[0], tmp1, GEN_INT (value)));
else
{
emit_insn (gen_addsi3 (operands
[
0
]
, operands
[
0
]
,
GEN_INT ((value >> 16) + ((value >> 15) & 1))));
HOST_WIDE_INT high_int = value & (~ (HOST_WIDE_INT) 0xffff);
HOST_WIDE_INT low_int = value & 0xffff;
rtx tmp2 = (!new_reg_p || !low_int) ? operands[0] : gen_reg_rtx (Pmode);
if (low_int & 0x8000)
high_int += 0x10000, low_int |= ((HOST_WIDE_INT) -1) << 16;
if ((value & 0xffff) != 0)
emit_insn (gen_addsi3 (operands[0], operands[0],
GEN_INT (value & 0xffff
)));
emit_insn (gen_addsi3 (tmp2, tmp1, GEN_INT (high_int)));
if (low_int)
emit_insn (gen_addsi3 (operands[0], tmp2, GEN_INT (low_int
)));
}
}
DONE;
...
...
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