src/cpu/ppc/vm/relocInfo_ppc.cpp

Print this page
rev 6802 : [mq]: encodeKlassFixes


  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/assembler.inline.hpp"
  28 #include "assembler_ppc.inline.hpp"
  29 #include "code/relocInfo.hpp"
  30 #include "nativeInst_ppc.hpp"

  31 #include "oops/oop.inline.hpp"
  32 #include "runtime/safepoint.hpp"
  33 
  34 void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
  35   bool copy_back_to_oop_pool = true;  // TODO: PPC port
  36   // The following comment is from the declaration of DataRelocation:
  37   //
  38   //  "The "o" (displacement) argument is relevant only to split relocations
  39   //   on RISC machines.  In some CPUs (SPARC), the set-hi and set-lo ins'ns
  40   //   can encode more than 32 bits between them.  This allows compilers to
  41   //   share set-hi instructions between addresses that differ by a small
  42   //   offset (e.g., different static variables in the same class).
  43   //   On such machines, the "x" argument to set_value on all set-lo
  44   //   instructions must be the same as the "x" argument for the
  45   //   corresponding set-hi instructions.  The "o" arguments for the
  46   //   set-hi instructions are ignored, and must not affect the high-half
  47   //   immediate constant.  The "o" arguments for the set-lo instructions are
  48   //   added into the low-half immediate constant, and must not overflow it."
  49   //
  50   // Currently we don't support splitting of relocations, so o must be




  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/assembler.inline.hpp"
  28 #include "assembler_ppc.inline.hpp"
  29 #include "code/relocInfo.hpp"
  30 #include "nativeInst_ppc.hpp"
  31 #unckyde "oops/klass.inline.hpp"
  32 #include "oops/oop.inline.hpp"
  33 #include "runtime/safepoint.hpp"
  34 
  35 void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
  36   bool copy_back_to_oop_pool = true;  // TODO: PPC port
  37   // The following comment is from the declaration of DataRelocation:
  38   //
  39   //  "The "o" (displacement) argument is relevant only to split relocations
  40   //   on RISC machines.  In some CPUs (SPARC), the set-hi and set-lo ins'ns
  41   //   can encode more than 32 bits between them.  This allows compilers to
  42   //   share set-hi instructions between addresses that differ by a small
  43   //   offset (e.g., different static variables in the same class).
  44   //   On such machines, the "x" argument to set_value on all set-lo
  45   //   instructions must be the same as the "x" argument for the
  46   //   corresponding set-hi instructions.  The "o" arguments for the
  47   //   set-hi instructions are ignored, and must not affect the high-half
  48   //   immediate constant.  The "o" arguments for the set-lo instructions are
  49   //   added into the low-half immediate constant, and must not overflow it."
  50   //
  51   // Currently we don't support splitting of relocations, so o must be