hotspot/src/cpu/x86/vm/x86_32.ad
changeset 46968 9119841280f4
parent 46735 219c4312853e
equal deleted inserted replaced
46953:39063b484ec2 46968:9119841280f4
     1 //
     1 //
     2 // Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     2 // Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 //
     4 //
     5 // This code is free software; you can redistribute it and/or modify it
     5 // This code is free software; you can redistribute it and/or modify it
     6 // under the terms of the GNU General Public License version 2 only, as
     6 // under the terms of the GNU General Public License version 2 only, as
     7 // published by the Free Software Foundation.
     7 // published by the Free Software Foundation.
   389 // emit 32 bit value and construct relocation entry from RelocationHolder
   389 // emit 32 bit value and construct relocation entry from RelocationHolder
   390 void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
   390 void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
   391         int format) {
   391         int format) {
   392 #ifdef ASSERT
   392 #ifdef ASSERT
   393   if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
   393   if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
   394     assert(cast_to_oop(d32)->is_oop() && (ScavengeRootsInCode || !cast_to_oop(d32)->is_scavengable()), "cannot embed scavengable oops in code");
   394     assert(oopDesc::is_oop(cast_to_oop(d32)) && (ScavengeRootsInCode || !cast_to_oop(d32)->is_scavengable()), "cannot embed scavengable oops in code");
   395   }
   395   }
   396 #endif
   396 #endif
   397   cbuf.relocate(cbuf.insts_mark(), rspec, format);
   397   cbuf.relocate(cbuf.insts_mark(), rspec, format);
   398   cbuf.insts()->emit_int32(d32);
   398   cbuf.insts()->emit_int32(d32);
   399 }
   399 }