src/cpu/ppc/vm/frame_ppc.hpp

changeset 6511
31e80afe3fed
parent 6495
67fa91961822
child 6512
fd1b9f02cc91
     1.1 --- a/src/cpu/ppc/vm/frame_ppc.hpp	Thu Feb 20 11:05:12 2014 +0100
     1.2 +++ b/src/cpu/ppc/vm/frame_ppc.hpp	Thu Mar 06 10:55:28 2014 -0800
     1.3 @@ -50,7 +50,7 @@
     1.4    //            [C_FRAME]
     1.5    //
     1.6    //  C_FRAME:
     1.7 -  //    0       [ABI_112]
     1.8 +  //    0       [ABI_REG_ARGS]
     1.9    //    112     CARG_9: outgoing arg 9 (arg_1 ... arg_8 via gpr_3 ... gpr_{10})
    1.10    //            ...
    1.11    //    40+M*8  CARG_M: outgoing arg M (M is the maximum of outgoing args taken over all call sites in the procedure)
    1.12 @@ -77,7 +77,7 @@
    1.13    //    32      reserved
    1.14    //    40      space for TOC (=R2) register for next call
    1.15    //
    1.16 -  //  ABI_112:
    1.17 +  //  ABI_REG_ARGS:
    1.18    //    0       [ABI_48]
    1.19    //    48      CARG_1: spill slot for outgoing arg 1. used by next callee.
    1.20    //    ...     ...
    1.21 @@ -95,23 +95,25 @@
    1.22      log_2_of_alignment_in_bits = 7
    1.23    };
    1.24  
    1.25 -  // ABI_48:
    1.26 -  struct abi_48 {
    1.27 +  // ABI_MINFRAME:
    1.28 +  struct abi_minframe {
    1.29      uint64_t callers_sp;
    1.30      uint64_t cr;                                  //_16
    1.31      uint64_t lr;
    1.32 +#if !defined(ABI_ELFv2)
    1.33      uint64_t reserved1;                           //_16
    1.34      uint64_t reserved2;
    1.35 +#endif
    1.36      uint64_t toc;                                 //_16
    1.37      // nothing to add here!
    1.38      // aligned to frame::alignment_in_bytes (16)
    1.39    };
    1.40  
    1.41    enum {
    1.42 -    abi_48_size = sizeof(abi_48)
    1.43 +    abi_minframe_size = sizeof(abi_minframe)
    1.44    };
    1.45  
    1.46 -  struct abi_112 : abi_48 {
    1.47 +  struct abi_reg_args : abi_minframe {
    1.48      uint64_t carg_1;
    1.49      uint64_t carg_2;                              //_16
    1.50      uint64_t carg_3;
    1.51 @@ -124,13 +126,13 @@
    1.52    };
    1.53  
    1.54    enum {
    1.55 -    abi_112_size = sizeof(abi_112)
    1.56 +    abi_reg_args_size = sizeof(abi_reg_args)
    1.57    };
    1.58  
    1.59    #define _abi(_component) \
    1.60 -          (offset_of(frame::abi_112, _component))
    1.61 +          (offset_of(frame::abi_reg_args, _component))
    1.62  
    1.63 -  struct abi_112_spill : abi_112 {
    1.64 +  struct abi_reg_args_spill : abi_reg_args {
    1.65      // additional spill slots
    1.66      uint64_t spill_ret;
    1.67      uint64_t spill_fret;                          //_16
    1.68 @@ -138,11 +140,11 @@
    1.69    };
    1.70  
    1.71    enum {
    1.72 -    abi_112_spill_size = sizeof(abi_112_spill)
    1.73 +    abi_reg_args_spill_size = sizeof(abi_reg_args_spill)
    1.74    };
    1.75  
    1.76 -  #define _abi_112_spill(_component) \
    1.77 -          (offset_of(frame::abi_112_spill, _component))
    1.78 +  #define _abi_reg_args_spill(_component) \
    1.79 +          (offset_of(frame::abi_reg_args_spill, _component))
    1.80  
    1.81    // non-volatile GPRs:
    1.82  
    1.83 @@ -242,7 +244,7 @@
    1.84    //            [ENTRY_FRAME_LOCALS]
    1.85    //
    1.86    //  PARENT_IJAVA_FRAME_ABI:
    1.87 -  //    0       [ABI_48]
    1.88 +  //    0       [ABI_MINFRAME]
    1.89    //            top_frame_sp
    1.90    //            initial_caller_sp
    1.91    //
    1.92 @@ -258,7 +260,7 @@
    1.93  
    1.94    // PARENT_IJAVA_FRAME_ABI
    1.95  
    1.96 -  struct parent_ijava_frame_abi : abi_48 {
    1.97 +  struct parent_ijava_frame_abi : abi_minframe {
    1.98      // SOE registers.
    1.99      // C2i adapters spill their top-frame stack-pointer here.
   1.100      uint64_t top_frame_sp;                        //      carg_1
   1.101 @@ -285,7 +287,7 @@
   1.102      uint64_t carg_6_unused;                       //_16   carg_6
   1.103      uint64_t carg_7_unused;                       //      carg_7
   1.104      // Use arg8 for storing frame_manager_lr. The size of
   1.105 -    // top_ijava_frame_abi must match abi_112.
   1.106 +    // top_ijava_frame_abi must match abi_reg_args.
   1.107      uint64_t frame_manager_lr;                    //_16   carg_8
   1.108      // nothing to add here!
   1.109      // aligned to frame::alignment_in_bytes (16)
   1.110 @@ -395,8 +397,8 @@
   1.111    intptr_t* fp() const { return _fp; }
   1.112  
   1.113    // Accessors for ABIs
   1.114 -  inline abi_48* own_abi()     const { return (abi_48*) _sp; }
   1.115 -  inline abi_48* callers_abi() const { return (abi_48*) _fp; }
   1.116 +  inline abi_minframe* own_abi()     const { return (abi_minframe*) _sp; }
   1.117 +  inline abi_minframe* callers_abi() const { return (abi_minframe*) _fp; }
   1.118  
   1.119   private:
   1.120  

mercurial