< prev index next >

src/share/vm/asm/assembler.hpp

Print this page




 320   // Copy str to a buffer that has the same lifetime as the CodeBuffer
 321   const char* code_string(const char* str);
 322 
 323   // Label functions
 324   void bind(Label& L); // binds an unbound label L to the current code position
 325 
 326   // Move to a different section in the same code buffer.
 327   void set_code_section(CodeSection* cs);
 328 
 329   // Inform assembler when generating stub code and relocation info
 330   address    start_a_stub(int required_space);
 331   void       end_a_stub();
 332   // Ditto for constants.
 333   address    start_a_const(int required_space, int required_align = sizeof(double));
 334   void       end_a_const(CodeSection* cs);  // Pass the codesection to continue in (insts or stubs?).
 335 
 336   // constants support
 337   //
 338   // We must remember the code section (insts or stubs) in c1
 339   // so we can reset to the proper section in end_a_const().









 340   address long_constant(jlong c) {
 341     CodeSection* c1 = _code_section;
 342     address ptr = start_a_const(sizeof(c), sizeof(c));
 343     if (ptr != NULL) {
 344       emit_int64(c);
 345       end_a_const(c1);
 346     }
 347     return ptr;
 348   }
 349   address double_constant(jdouble c) {
 350     CodeSection* c1 = _code_section;
 351     address ptr = start_a_const(sizeof(c), sizeof(c));
 352     if (ptr != NULL) {
 353       emit_double(c);
 354       end_a_const(c1);
 355     }
 356     return ptr;
 357   }
 358   address float_constant(jfloat c) {
 359     CodeSection* c1 = _code_section;




 320   // Copy str to a buffer that has the same lifetime as the CodeBuffer
 321   const char* code_string(const char* str);
 322 
 323   // Label functions
 324   void bind(Label& L); // binds an unbound label L to the current code position
 325 
 326   // Move to a different section in the same code buffer.
 327   void set_code_section(CodeSection* cs);
 328 
 329   // Inform assembler when generating stub code and relocation info
 330   address    start_a_stub(int required_space);
 331   void       end_a_stub();
 332   // Ditto for constants.
 333   address    start_a_const(int required_space, int required_align = sizeof(double));
 334   void       end_a_const(CodeSection* cs);  // Pass the codesection to continue in (insts or stubs?).
 335 
 336   // constants support
 337   //
 338   // We must remember the code section (insts or stubs) in c1
 339   // so we can reset to the proper section in end_a_const().
 340   address int_constant(jint c) {
 341     CodeSection* c1 = _code_section;
 342     address ptr = start_a_const(sizeof(c), sizeof(c));
 343     if (ptr != NULL) {
 344       emit_int32(c);
 345       end_a_const(c1);
 346     }
 347     return ptr;
 348   }
 349   address long_constant(jlong c) {
 350     CodeSection* c1 = _code_section;
 351     address ptr = start_a_const(sizeof(c), sizeof(c));
 352     if (ptr != NULL) {
 353       emit_int64(c);
 354       end_a_const(c1);
 355     }
 356     return ptr;
 357   }
 358   address double_constant(jdouble c) {
 359     CodeSection* c1 = _code_section;
 360     address ptr = start_a_const(sizeof(c), sizeof(c));
 361     if (ptr != NULL) {
 362       emit_double(c);
 363       end_a_const(c1);
 364     }
 365     return ptr;
 366   }
 367   address float_constant(jfloat c) {
 368     CodeSection* c1 = _code_section;


< prev index next >