src/cpu/ppc/vm/macroAssembler_ppc.hpp

changeset 6512
fd1b9f02cc91
parent 6511
31e80afe3fed
child 6515
71a71b0bc844
     1.1 --- a/src/cpu/ppc/vm/macroAssembler_ppc.hpp	Thu Mar 06 10:55:28 2014 -0800
     1.2 +++ b/src/cpu/ppc/vm/macroAssembler_ppc.hpp	Mon Mar 10 12:58:02 2014 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4  /*
     1.5   * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 - * Copyright 2012, 2013 SAP AG. All rights reserved.
     1.7 + * Copyright 2012, 2014 SAP AG. All rights reserved.
     1.8   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.9   *
    1.10   * This code is free software; you can redistribute it and/or modify it
    1.11 @@ -566,12 +566,14 @@
    1.12  
    1.13    // Load heap oop and decompress. Loaded oop may not be null.
    1.14    inline void load_heap_oop_not_null(Register d, RegisterOrConstant offs, Register s1 = noreg);
    1.15 +  inline void store_heap_oop_not_null(Register d, RegisterOrConstant offs, Register s1,
    1.16 +                                      /*specify if d must stay uncompressed*/ Register tmp = noreg);
    1.17  
    1.18    // Null allowed.
    1.19    inline void load_heap_oop(Register d, RegisterOrConstant offs, Register s1 = noreg);
    1.20  
    1.21    // Encode/decode heap oop. Oop may not be null, else en/decoding goes wrong.
    1.22 -  inline void encode_heap_oop_not_null(Register d);
    1.23 +  inline Register encode_heap_oop_not_null(Register d, Register src = noreg);
    1.24    inline void decode_heap_oop_not_null(Register d);
    1.25  
    1.26    // Null allowed.
    1.27 @@ -581,6 +583,7 @@
    1.28    void load_klass(Register dst, Register src);
    1.29    void load_klass_with_trap_null_check(Register dst, Register src);
    1.30    void store_klass(Register dst_oop, Register klass, Register tmp = R0);
    1.31 +  void store_klass_gap(Register dst_oop, Register val = noreg); // Will store 0 if val not specified.
    1.32    static int instr_size_for_decode_klass_not_null();
    1.33    void decode_klass_not_null(Register dst, Register src = noreg);
    1.34    void encode_klass_not_null(Register dst, Register src = noreg);
    1.35 @@ -693,4 +696,21 @@
    1.36    void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;
    1.37  };
    1.38  
    1.39 +// class SkipIfEqualZero:
    1.40 +//
    1.41 +// Instantiating this class will result in assembly code being output that will
    1.42 +// jump around any code emitted between the creation of the instance and it's
    1.43 +// automatic destruction at the end of a scope block, depending on the value of
    1.44 +// the flag passed to the constructor, which will be checked at run-time.
    1.45 +class SkipIfEqualZero : public StackObj {
    1.46 + private:
    1.47 +  MacroAssembler* _masm;
    1.48 +  Label _label;
    1.49 +
    1.50 + public:
    1.51 +   // 'Temp' is a temp register that this object can use (and trash).
    1.52 +   explicit SkipIfEqualZero(MacroAssembler*, Register temp, const bool* flag_addr);
    1.53 +   ~SkipIfEqualZero();
    1.54 +};
    1.55 +
    1.56  #endif // CPU_PPC_VM_MACROASSEMBLER_PPC_HPP

mercurial