src/cpu/zero/vm/stubGenerator_zero.cpp

Print this page




 159       StubRoutines::_jshort_disjoint_arraycopy;
 160     StubRoutines::_arrayof_jshort_arraycopy =
 161       StubRoutines::_jshort_arraycopy;
 162 
 163     StubRoutines::_arrayof_jint_disjoint_arraycopy =
 164       StubRoutines::_jint_disjoint_arraycopy;
 165     StubRoutines::_arrayof_jint_arraycopy =
 166       StubRoutines::_jint_arraycopy;
 167 
 168     StubRoutines::_arrayof_jlong_disjoint_arraycopy =
 169       StubRoutines::_jlong_disjoint_arraycopy;
 170     StubRoutines::_arrayof_jlong_arraycopy =
 171       StubRoutines::_jlong_arraycopy;
 172 
 173     StubRoutines::_arrayof_oop_disjoint_arraycopy =
 174       StubRoutines::_oop_disjoint_arraycopy;
 175     StubRoutines::_arrayof_oop_arraycopy =
 176       StubRoutines::_oop_arraycopy;
 177   }
 178 













 179   void generate_initial() {
 180     // Generates all stubs and initializes the entry points
 181 
 182     // entry points that exist in all platforms Note: This is code
 183     // that could be shared among different platforms - however the
 184     // benefit seems to be smaller than the disadvantage of having a
 185     // much more complicated generator structure. See also comment in
 186     // stubRoutines.hpp.
 187 
 188     StubRoutines::_forward_exception_entry   = ShouldNotCallThisStub();
 189     StubRoutines::_call_stub_entry           = (address) call_stub;
 190     StubRoutines::_catch_exception_entry     = ShouldNotCallThisStub();
 191 
 192     // atomic calls
 193     StubRoutines::_atomic_xchg_entry         = ShouldNotCallThisStub();
 194     StubRoutines::_atomic_xchg_ptr_entry     = ShouldNotCallThisStub();
 195     StubRoutines::_atomic_cmpxchg_entry      = ShouldNotCallThisStub();
 196     StubRoutines::_atomic_cmpxchg_ptr_entry  = ShouldNotCallThisStub();
 197     StubRoutines::_atomic_cmpxchg_long_entry = ShouldNotCallThisStub();
 198     StubRoutines::_atomic_add_entry          = ShouldNotCallThisStub();


 208     // Generates all stubs and initializes the entry points
 209 
 210     // These entry points require SharedInfo::stack0 to be set up in
 211     // non-core builds and need to be relocatable, so they each
 212     // fabricate a RuntimeStub internally.
 213     StubRoutines::_throw_AbstractMethodError_entry =
 214       ShouldNotCallThisStub();
 215 
 216     StubRoutines::_throw_NullPointerException_at_call_entry =
 217       ShouldNotCallThisStub();
 218 
 219     StubRoutines::_throw_StackOverflowError_entry =
 220       ShouldNotCallThisStub();
 221 
 222     // support for verify_oop (must happen after universe_init)
 223     StubRoutines::_verify_oop_subroutine_entry =
 224       ShouldNotCallThisStub();
 225 
 226     // arraycopy stubs used by compilers
 227     generate_arraycopy_stubs();









 228   }
 229 
 230  public:
 231   StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
 232     if (all) {
 233       generate_all();
 234     } else {
 235       generate_initial();
 236     }
 237   }
 238 };
 239 
 240 void StubGenerator_generate(CodeBuffer* code, bool all) {
 241   StubGenerator g(code, all);
 242 }
 243 
 244 EntryFrame *EntryFrame::build(const intptr_t*  parameters,
 245                               int              parameter_words,
 246                               JavaCallWrapper* call_wrapper,
 247                               TRAPS) {


 159       StubRoutines::_jshort_disjoint_arraycopy;
 160     StubRoutines::_arrayof_jshort_arraycopy =
 161       StubRoutines::_jshort_arraycopy;
 162 
 163     StubRoutines::_arrayof_jint_disjoint_arraycopy =
 164       StubRoutines::_jint_disjoint_arraycopy;
 165     StubRoutines::_arrayof_jint_arraycopy =
 166       StubRoutines::_jint_arraycopy;
 167 
 168     StubRoutines::_arrayof_jlong_disjoint_arraycopy =
 169       StubRoutines::_jlong_disjoint_arraycopy;
 170     StubRoutines::_arrayof_jlong_arraycopy =
 171       StubRoutines::_jlong_arraycopy;
 172 
 173     StubRoutines::_arrayof_oop_disjoint_arraycopy =
 174       StubRoutines::_oop_disjoint_arraycopy;
 175     StubRoutines::_arrayof_oop_arraycopy =
 176       StubRoutines::_oop_arraycopy;
 177   }
 178 
 179   static int SafeFetch32(int *adr, int errValue) {
 180     int value = errValue;
 181     value = *adr;
 182     return value;
 183   }
 184 
 185   static intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) {
 186     intptr_t value = errValue;
 187     value = *adr;
 188     return value;
 189   }
 190 
 191 
 192   void generate_initial() {
 193     // Generates all stubs and initializes the entry points
 194 
 195     // entry points that exist in all platforms Note: This is code
 196     // that could be shared among different platforms - however the
 197     // benefit seems to be smaller than the disadvantage of having a
 198     // much more complicated generator structure. See also comment in
 199     // stubRoutines.hpp.
 200 
 201     StubRoutines::_forward_exception_entry   = ShouldNotCallThisStub();
 202     StubRoutines::_call_stub_entry           = (address) call_stub;
 203     StubRoutines::_catch_exception_entry     = ShouldNotCallThisStub();
 204 
 205     // atomic calls
 206     StubRoutines::_atomic_xchg_entry         = ShouldNotCallThisStub();
 207     StubRoutines::_atomic_xchg_ptr_entry     = ShouldNotCallThisStub();
 208     StubRoutines::_atomic_cmpxchg_entry      = ShouldNotCallThisStub();
 209     StubRoutines::_atomic_cmpxchg_ptr_entry  = ShouldNotCallThisStub();
 210     StubRoutines::_atomic_cmpxchg_long_entry = ShouldNotCallThisStub();
 211     StubRoutines::_atomic_add_entry          = ShouldNotCallThisStub();


 221     // Generates all stubs and initializes the entry points
 222 
 223     // These entry points require SharedInfo::stack0 to be set up in
 224     // non-core builds and need to be relocatable, so they each
 225     // fabricate a RuntimeStub internally.
 226     StubRoutines::_throw_AbstractMethodError_entry =
 227       ShouldNotCallThisStub();
 228 
 229     StubRoutines::_throw_NullPointerException_at_call_entry =
 230       ShouldNotCallThisStub();
 231 
 232     StubRoutines::_throw_StackOverflowError_entry =
 233       ShouldNotCallThisStub();
 234 
 235     // support for verify_oop (must happen after universe_init)
 236     StubRoutines::_verify_oop_subroutine_entry =
 237       ShouldNotCallThisStub();
 238 
 239     // arraycopy stubs used by compilers
 240     generate_arraycopy_stubs();
 241 
 242     // Safefetch stubs.
 243     StubRoutines::_safefetch32_entry = CAST_FROM_FN_PTR(address, StubGenerator::SafeFetch32);
 244     StubRoutines::_safefetch32_fault_pc = NULL;
 245     StubRoutines::_safefetch32_continuation_pc = NULL;
 246 
 247     StubRoutines::_safefetchN_entry = CAST_FROM_FN_PTR(address, StubGenerator::SafeFetchN);
 248     StubRoutines::_safefetchN_fault_pc = NULL;
 249     StubRoutines::_safefetchN_continuation_pc = NULL;
 250   }
 251 
 252  public:
 253   StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
 254     if (all) {
 255       generate_all();
 256     } else {
 257       generate_initial();
 258     }
 259   }
 260 };
 261 
 262 void StubGenerator_generate(CodeBuffer* code, bool all) {
 263   StubGenerator g(code, all);
 264 }
 265 
 266 EntryFrame *EntryFrame::build(const intptr_t*  parameters,
 267                               int              parameter_words,
 268                               JavaCallWrapper* call_wrapper,
 269                               TRAPS) {