* [PATCH] C-SKY: Delete LO_REGS and HI_REGS, use HILO_REGS instead.
@ 2021-04-30 12:58 Geng Qi
0 siblings, 0 replies; only message in thread
From: Geng Qi @ 2021-04-30 12:58 UTC (permalink / raw)
To: gcc-patches, cooper.qu; +Cc: Geng Qi
gcc/ChangeLog:
* config/csky/constraints.md ("l", "h"): Delete.
* config/csky/csky.h (reg_class, REG_CLASS_NAMES,
REG_CLASS_CONTENTS): Delete LO_REGS and HI_REGS.
* config/csky/csky.c (regno_reg_classm,
csky_secondary_reload, csky_register_move_cost):
Use HILO_REGS instead of LO_REGS and HI_REGS.
---
gcc/config/csky/constraints.md | 2 --
gcc/config/csky/csky.c | 7 +++----
gcc/config/csky/csky.h | 8 --------
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/gcc/config/csky/constraints.md b/gcc/config/csky/constraints.md
index 937cb81..c9bc9f2 100644
--- a/gcc/config/csky/constraints.md
+++ b/gcc/config/csky/constraints.md
@@ -24,8 +24,6 @@
(define_register_constraint "b" "LOW_REGS" "r0 - r15")
(define_register_constraint "c" "C_REGS" "C register")
(define_register_constraint "y" "HILO_REGS" "HI and LO registers")
-(define_register_constraint "l" "LO_REGS" "LO register")
-(define_register_constraint "h" "HI_REGS" "HI register")
(define_register_constraint "v" "V_REGS" "vector registers")
(define_register_constraint "z" "SP_REGS" "SP register")
diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index 6e97994..b2160b9 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -112,7 +112,7 @@ enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER] =
/* Reserved. */
RESERVE_REGS,
/* CC,HI,LO registers. */
- C_REGS, HI_REGS, LO_REGS,
+ C_REGS, HILO_REGS, HILO_REGS,
/* Reserved. */
RESERVE_REGS, RESERVE_REGS, RESERVE_REGS, RESERVE_REGS,
RESERVE_REGS, RESERVE_REGS, RESERVE_REGS, RESERVE_REGS,
@@ -2477,8 +2477,7 @@ csky_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x,
/* We always require a general register when copying anything to
HI/LO_REGNUM, except when copying an SImode value from HI/LO_REGNUM
to a general register, or when copying from register 0. */
- if ((rclass == HILO_REGS || rclass == LO_REGS || rclass == HI_REGS)
- && !CSKY_GENERAL_REGNO_P (regno))
+ if (rclass == HILO_REGS && !CSKY_GENERAL_REGNO_P (regno))
return GENERAL_REGS;
if (rclass == V_REGS && !CSKY_GENERAL_REGNO_P (regno))
@@ -6546,7 +6545,7 @@ csky_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
|| (CLASS) == LOW_REGS)
#define HILO_REG_CLASS_P(CLASS) \
- ((CLASS) == HI_REGS || (CLASS) == LO_REGS || (CLASS) == HILO_REGS)
+ ((CLASS) == HILO_REGS)
#define V_REG_CLASS_P(CLASS) \
((CLASS) == V_REGS)
diff --git a/gcc/config/csky/csky.h b/gcc/config/csky/csky.h
index f535c42..1fd72d0 100644
--- a/gcc/config/csky/csky.h
+++ b/gcc/config/csky/csky.h
@@ -685,8 +685,6 @@ enum reg_class
LOW_REGS,
GENERAL_REGS,
C_REGS,
- HI_REGS,
- LO_REGS,
HILO_REGS,
V_REGS,
OTHER_REGS,
@@ -706,8 +704,6 @@ enum reg_class
"LOW_REGS", \
"GENERAL_REGS", \
"C_REGS", \
- "HI_REGS", \
- "LO_REGS", \
"HILO_REGS", \
"V_REGS", \
"OTHER_REGS", \
@@ -731,10 +727,6 @@ enum reg_class
0x00000000, 0x00000000, 0x00000000}, /* GENERAL_REGS */ \
{0x00000000, 0x00000002, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000}, /* C_REGS */ \
- {0x00000000, 0x00000004, 0x00000000, 0x00000000, \
- 0x00000000, 0x00000000, 0x00000000}, /* HI_REG */ \
- {0x00000000, 0x00000008, 0x00000000, 0x00000000, \
- 0x00000000, 0x00000000, 0x00000000}, /* LO_REG */ \
{0x00000000, 0x0000000c, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000}, /* HILO_REGS */ \
{0x00000000, 0xFFF00000, 0x007FFF8F, 0x00000000, \
--
2.7.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-30 12:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 12:58 [PATCH] C-SKY: Delete LO_REGS and HI_REGS, use HILO_REGS instead Geng Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).