From 7bf65250f195566a57ab6338aef7aa4d13c035a2 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 8 Dec 2016 20:15:45 +0100 Subject: [PATCH] i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P. * gcc.target/i386/i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P. (HARD_REGNO_NREGS_HAS_PADDING): Ditto. Simplify macro. From-SVN: r243455 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.h | 19 ++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ada9cdf598..1becd5fddb5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-12-08 Uros Bizjak + + * gcc.target/i386/i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P. + (HARD_REGNO_NREGS_HAS_PADDING): Ditto. Simplify macro. + 2016-12-08 David Malcolm * emit-rtl.c (gen_reg_rtx): Move regno_pointer_align and diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 83ffd4e5a58..8bc31f9187d 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1080,22 +1080,19 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); applied to them. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ - (STACK_REGNO_P (REGNO) || SSE_REGNO_P (REGNO) || MMX_REGNO_P (REGNO) \ - || MASK_REGNO_P (REGNO) || BND_REGNO_P (REGNO) \ - ? (COMPLEX_MODE_P (MODE) ? 2 : \ - (((MODE == V64SFmode) || (MODE == V64SImode)) ? 4 : 1)) \ - : ((MODE) == XFmode \ + (GENERAL_REGNO_P (REGNO) \ + ? ((MODE) == XFmode \ ? (TARGET_64BIT ? 2 : 3) \ : ((MODE) == XCmode \ ? (TARGET_64BIT ? 4 : 6) \ - : CEIL (GET_MODE_SIZE (MODE), UNITS_PER_WORD)))) + : CEIL (GET_MODE_SIZE (MODE), UNITS_PER_WORD))) \ + : (COMPLEX_MODE_P (MODE) ? 2 : \ + (((MODE == V64SFmode) || (MODE == V64SImode)) ? 4 : 1))) #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) \ - ((TARGET_128BIT_LONG_DOUBLE && !TARGET_64BIT) \ - ? (STACK_REGNO_P (REGNO) || SSE_REGNO_P (REGNO) || MMX_REGNO_P (REGNO) \ - ? 0 \ - : ((MODE) == XFmode || (MODE) == XCmode)) \ - : 0) + (TARGET_128BIT_LONG_DOUBLE && !TARGET_64BIT \ + && GENERAL_REGNO_P (REGNO) \ + && ((MODE) == XFmode || (MODE) == XCmode)) #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) ((MODE) == XFmode ? 4 : 8) -- 2.30.2