comparison src/cpu/x86/vm/assembler_x86.hpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 006050192a5a
children 75f33eecc1b3
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
297 int disp() const { return _disp; } 297 int disp() const { return _disp; }
298 298
299 // Convert the raw encoding form into the form expected by the constructor for 299 // Convert the raw encoding form into the form expected by the constructor for
300 // Address. An index of 4 (rsp) corresponds to having no index, so convert 300 // Address. An index of 4 (rsp) corresponds to having no index, so convert
301 // that to noreg for the Address constructor. 301 // that to noreg for the Address constructor.
302 static Address make_raw(int base, int index, int scale, int disp, bool disp_is_oop); 302 static Address make_raw(int base, int index, int scale, int disp, relocInfo::relocType disp_reloc);
303 303
304 static Address make_array(ArrayAddress); 304 static Address make_array(ArrayAddress);
305 305
306 private: 306 private:
307 bool base_needs_rex() const { 307 bool base_needs_rex() const {
385 class RuntimeAddress: public AddressLiteral { 385 class RuntimeAddress: public AddressLiteral {
386 386
387 public: 387 public:
388 388
389 RuntimeAddress(address target) : AddressLiteral(target, relocInfo::runtime_call_type) {} 389 RuntimeAddress(address target) : AddressLiteral(target, relocInfo::runtime_call_type) {}
390
391 };
392
393 class OopAddress: public AddressLiteral {
394
395 public:
396
397 OopAddress(address target) : AddressLiteral(target, relocInfo::oop_type){}
398 390
399 }; 391 };
400 392
401 class ExternalAddress: public AddressLiteral { 393 class ExternalAddress: public AddressLiteral {
402 private: 394 private:
666 void emit_arith_b(int op1, int op2, Register dst, int imm8); 658 void emit_arith_b(int op1, int op2, Register dst, int imm8);
667 659
668 void emit_arith(int op1, int op2, Register dst, int32_t imm32); 660 void emit_arith(int op1, int op2, Register dst, int32_t imm32);
669 // Force generation of a 4 byte immediate value even if it fits into 8bit 661 // Force generation of a 4 byte immediate value even if it fits into 8bit
670 void emit_arith_imm32(int op1, int op2, Register dst, int32_t imm32); 662 void emit_arith_imm32(int op1, int op2, Register dst, int32_t imm32);
671 // only 32bit??
672 void emit_arith(int op1, int op2, Register dst, jobject obj);
673 void emit_arith(int op1, int op2, Register dst, Register src); 663 void emit_arith(int op1, int op2, Register dst, Register src);
674 664
675 void emit_simd_arith(int opcode, XMMRegister dst, Address src, VexSimdPrefix pre); 665 void emit_simd_arith(int opcode, XMMRegister dst, Address src, VexSimdPrefix pre);
676 void emit_simd_arith(int opcode, XMMRegister dst, XMMRegister src, VexSimdPrefix pre); 666 void emit_simd_arith(int opcode, XMMRegister dst, XMMRegister src, VexSimdPrefix pre);
677 void emit_simd_arith_nonds(int opcode, XMMRegister dst, Address src, VexSimdPrefix pre); 667 void emit_simd_arith_nonds(int opcode, XMMRegister dst, Address src, VexSimdPrefix pre);
1970 Register last_java_sp, 1960 Register last_java_sp,
1971 address entry_point, 1961 address entry_point,
1972 Register arg_1, Register arg_2, Register arg_3, 1962 Register arg_1, Register arg_2, Register arg_3,
1973 bool check_exceptions = true); 1963 bool check_exceptions = true);
1974 1964
1965 void get_vm_result (Register oop_result, Register thread);
1966 void get_vm_result_2(Register metadata_result, Register thread);
1967
1975 // These always tightly bind to MacroAssembler::call_VM_base 1968 // These always tightly bind to MacroAssembler::call_VM_base
1976 // bypassing the virtual implementation 1969 // bypassing the virtual implementation
1977 void super_call_VM(Register oop_result, Register last_java_sp, address entry_point, int number_of_arguments = 0, bool check_exceptions = true); 1970 void super_call_VM(Register oop_result, Register last_java_sp, address entry_point, int number_of_arguments = 0, bool check_exceptions = true);
1978 void super_call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, bool check_exceptions = true); 1971 void super_call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, bool check_exceptions = true);
1979 void super_call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, bool check_exceptions = true); 1972 void super_call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, bool check_exceptions = true);
2385 void cmp32(Register src1, AddressLiteral src2); 2378 void cmp32(Register src1, AddressLiteral src2);
2386 2379
2387 void cmp32(Register src1, Address src2); 2380 void cmp32(Register src1, Address src2);
2388 2381
2389 #ifndef _LP64 2382 #ifndef _LP64
2383 void cmpklass(Address dst, Metadata* obj);
2384 void cmpklass(Register dst, Metadata* obj);
2390 void cmpoop(Address dst, jobject obj); 2385 void cmpoop(Address dst, jobject obj);
2391 void cmpoop(Register dst, jobject obj); 2386 void cmpoop(Register dst, jobject obj);
2392 #endif // _LP64 2387 #endif // _LP64
2393 2388
2394 // NOTE src2 must be the lval. This is NOT an mem-mem compare 2389 // NOTE src2 must be the lval. This is NOT an mem-mem compare
2484 // NOTE: this call tranfers to the effective address of entry NOT 2479 // NOTE: this call tranfers to the effective address of entry NOT
2485 // the address contained by entry. This is because this is more natural 2480 // the address contained by entry. This is because this is more natural
2486 // for jumps/calls. 2481 // for jumps/calls.
2487 void call(AddressLiteral entry); 2482 void call(AddressLiteral entry);
2488 2483
2484 // Emit the CompiledIC call idiom
2485 void ic_call(address entry);
2486
2489 // Jumps 2487 // Jumps
2490 2488
2491 // NOTE: these jumps tranfer to the effective address of dst NOT 2489 // NOTE: these jumps tranfer to the effective address of dst NOT
2492 // the address contained by dst. This is because this is more natural 2490 // the address contained by dst. This is because this is more natural
2493 // for jumps/calls. 2491 // for jumps/calls.
2721 void cmovptr(Condition cc, Register dst, Register src) { LP64_ONLY(cmovq(cc, dst, src)) NOT_LP64(cmov32(cc, dst, src)); } 2719 void cmovptr(Condition cc, Register dst, Register src) { LP64_ONLY(cmovq(cc, dst, src)) NOT_LP64(cmov32(cc, dst, src)); }
2722 2720
2723 void movoop(Register dst, jobject obj); 2721 void movoop(Register dst, jobject obj);
2724 void movoop(Address dst, jobject obj); 2722 void movoop(Address dst, jobject obj);
2725 2723
2724 void mov_metadata(Register dst, Metadata* obj);
2725 void mov_metadata(Address dst, Metadata* obj);
2726
2726 void movptr(ArrayAddress dst, Register src); 2727 void movptr(ArrayAddress dst, Register src);
2727 // can this do an lea? 2728 // can this do an lea?
2728 void movptr(Register dst, ArrayAddress src); 2729 void movptr(Register dst, ArrayAddress src);
2729 2730
2730 void movptr(Register dst, Address src); 2731 void movptr(Register dst, Address src);
2773 2774
2774 void pushptr(Address src) { LP64_ONLY(pushq(src)) NOT_LP64(pushl(src)); } 2775 void pushptr(Address src) { LP64_ONLY(pushq(src)) NOT_LP64(pushl(src)); }
2775 void popptr(Address src) { LP64_ONLY(popq(src)) NOT_LP64(popl(src)); } 2776 void popptr(Address src) { LP64_ONLY(popq(src)) NOT_LP64(popl(src)); }
2776 2777
2777 void pushoop(jobject obj); 2778 void pushoop(jobject obj);
2779 void pushklass(Metadata* obj);
2778 2780
2779 // sign extend as need a l to ptr sized element 2781 // sign extend as need a l to ptr sized element
2780 void movl2ptr(Register dst, Address src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(movl(dst, src)); } 2782 void movl2ptr(Register dst, Address src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(movl(dst, src)); }
2781 void movl2ptr(Register dst, Register src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(if (dst != src) movl(dst, src)); } 2783 void movl2ptr(Register dst, Register src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(if (dst != src) movl(dst, src)); }
2782 2784