From a2e2a4e427f6c657fe13c020caa81e949f310702 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 17 Dec 2015 15:06:03 +0000 Subject: [PATCH] nvptx.h (NVPTX_RETURN_REGNUM, [...]): Renumber. * config/nvptx/nvptx.h (NVPTX_RETURN_REGNUM, FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Renumber. (REGISTER_NAMES): Update and rename. (FIXED_REGISTERS, CALL_USED_REGISTERS): Update. (enum_reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Reformat. From-SVN: r231771 --- gcc/ChangeLog | 8 +++++++ gcc/config/nvptx/nvptx.h | 52 +++++++++++----------------------------- 2 files changed, 22 insertions(+), 38 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1c522800b9..f15d4428c7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-12-17 Nathan Sidwell + + * config/nvptx/nvptx.h (NVPTX_RETURN_REGNUM, FRAME_POINTER_REGNUM, + ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Renumber. + (REGISTER_NAMES): Update and rename. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Update. + (enum_reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Reformat. + 2015-12-17 Richard Biener PR tree-optimization/68946 diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index 0240d17ecfe..7f78dea72e9 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -78,19 +78,15 @@ #define PTRDIFF_TYPE (TARGET_ABI64 ? "long int" : "int") #define POINTER_SIZE (TARGET_ABI64 ? 64 : 32) - #define Pmode (TARGET_ABI64 ? DImode : SImode) /* Registers. Since ptx is a virtual target, we just define a few - hard registers for special purposes and leave pseudos unallocated. */ - -#define FIRST_PSEUDO_REGISTER 16 -/* We have to have some available hard registers, to keep gcc setup + hard registers for special purposes and leave pseudos unallocated. + We have to have some available hard registers, to keep gcc setup happy. */ -#define FIXED_REGISTERS \ - { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 } -#define CALL_USED_REGISTERS \ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } +#define FIRST_PSEUDO_REGISTER 16 +#define FIXED_REGISTERS { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +#define CALL_USED_REGISTERS { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } #define HARD_REGNO_NREGS(REG, MODE) \ ((void)(REG), (void)(MODE), 1) @@ -100,32 +96,13 @@ ((void)(REG), (void)(MODE), true) /* Register Classes. */ - -enum reg_class - { - NO_REGS, - ALL_REGS, - LIM_REG_CLASSES - }; - +enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; +#define REG_CLASS_NAMES { "NO_REGS", "ALL_REGS" } +#define REG_CLASS_CONTENTS { { 0x0000 }, { 0xFFFF } } #define N_REG_CLASSES (int) LIM_REG_CLASSES -#define REG_CLASS_NAMES { \ - "NO_REGS", \ - "ALL_REGS" } - -#define REG_CLASS_CONTENTS \ -{ \ - /* NO_REGS. */ \ - { 0x0000 }, \ - /* ALL_REGS. */ \ - { 0xFFFF }, \ -} - #define GENERAL_REGS ALL_REGS - #define REGNO_REG_CLASS(R) ((void)(R), ALL_REGS) - #define BASE_REG_CLASS ALL_REGS #define INDEX_REG_CLASS NO_REGS @@ -151,17 +128,16 @@ enum reg_class #define FRAME_GROWS_DOWNWARD 0 #define STACK_GROWS_DOWNWARD 1 +#define NVPTX_RETURN_REGNUM 0 #define STACK_POINTER_REGNUM 1 -#define NVPTX_RETURN_REGNUM 4 -#define FRAME_POINTER_REGNUM 15 -#define ARG_POINTER_REGNUM 14 - -#define STATIC_CHAIN_REGNUM 12 +#define FRAME_POINTER_REGNUM 2 +#define ARG_POINTER_REGNUM 3 +#define STATIC_CHAIN_REGNUM 4 #define REGISTER_NAMES \ { \ - "%hr0", "%outargs", "%hfp", "%hr3", "%retval", "%hr5", "%hr6", "%hr7", \ - "%hr8", "%hr9", "%hr10", "%hr11", "%chain_in", "%hr13", "%argp", "%frame" \ + "%value", "%stack", "%frame", "%args", "%chain", "%hr5", "%hr6", "%hr7", \ + "%hr8", "%hr9", "%hr10", "%hr11", "%hr12", "%hr13", "%hr14", "%hr15" \ } #define FIRST_PARM_OFFSET(FNDECL) ((void)(FNDECL), 0) -- 2.30.2