< prev index next >

src/hotspot/cpu/x86/c1_Runtime1_x86.cpp

Print this page

1023           __ set_info("fast new_instance", dont_gc_arguments);
1024         } else {
1025           assert(id == fast_new_instance_init_check_id, "bad StubID");
1026           __ set_info("fast new_instance init check", dont_gc_arguments);
1027         }
1028 
1029         __ enter();
1030         OopMap* map = save_live_registers(sasm, 2);
1031         int call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass);
1032         oop_maps = new OopMapSet();
1033         oop_maps->add_gc_map(call_offset, map);
1034         restore_live_registers_except_rax(sasm);
1035         __ verify_oop(obj);
1036         __ leave();
1037         __ ret(0);
1038 
1039         // rax,: new instance
1040       }
1041 
1042       break;
1043 










1044     case counter_overflow_id:
1045       {
1046         Register bci = rax, method = rbx;
1047         __ enter();
1048         OopMap* map = save_live_registers(sasm, 3);
1049         // Retrieve bci
1050         __ movl(bci, Address(rbp, 2*BytesPerWord));
1051         // And a pointer to the Method*
1052         __ movptr(method, Address(rbp, 3*BytesPerWord));
1053         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, counter_overflow), bci, method);
1054         oop_maps = new OopMapSet();
1055         oop_maps->add_gc_map(call_offset, map);
1056         restore_live_registers(sasm);
1057         __ leave();
1058         __ ret(0);
1059       }
1060       break;
1061 
1062     case new_type_array_id:
1063     case new_object_array_id:

1276         __ pop(rsi);
1277         __ pop(rdi);
1278         __ ret(0);
1279 
1280         __ bind(miss);
1281         __ movptr(Address(rsp, (result_off) * VMRegImpl::stack_slot_size), NULL_WORD); // result
1282         __ pop(rax);
1283         __ pop(rcx);
1284         __ pop(rsi);
1285         __ pop(rdi);
1286         __ ret(0);
1287       }
1288       break;
1289 
1290     case monitorenter_nofpu_id:
1291       save_fpu_registers = false;
1292       // fall through
1293     case monitorenter_id:
1294       {
1295         StubFrame f(sasm, "monitorenter", dont_gc_arguments);
1296         OopMap* map = save_live_registers(sasm, 3, save_fpu_registers);
1297 
1298         // Called with store_parameter and not C abi
1299 
1300         f.load_argument(1, rax); // rax,: object
1301         f.load_argument(0, rbx); // rbx,: lock address
1302 
1303         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorenter), rax, rbx);
1304 
1305         oop_maps = new OopMapSet();
1306         oop_maps->add_gc_map(call_offset, map);
1307         restore_live_registers(sasm, save_fpu_registers);
1308       }
1309       break;
1310 
1311     case monitorexit_nofpu_id:
1312       save_fpu_registers = false;
1313       // fall through
1314     case monitorexit_id:
1315       {
1316         StubFrame f(sasm, "monitorexit", dont_gc_arguments);
1317         OopMap* map = save_live_registers(sasm, 2, save_fpu_registers);
1318 
1319         // Called with store_parameter and not C abi
1320 
1321         f.load_argument(0, rax); // rax,: lock address
1322 
1323         // note: really a leaf routine but must setup last java sp
1324         //       => use call_RT for now (speed can be improved by
1325         //       doing last java sp setup manually)
1326         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorexit), rax);
1327 
1328         oop_maps = new OopMapSet();
1329         oop_maps->add_gc_map(call_offset, map);
1330         restore_live_registers(sasm, save_fpu_registers);
1331       }
1332       break;
1333 
1334     case deoptimize_id:
1335       {
1336         StubFrame f(sasm, "deoptimize", dont_gc_arguments);
1337         const int num_rt_args = 2;  // thread, trap_request
1338         OopMap* oop_map = save_live_registers(sasm, num_rt_args);
1339         f.load_argument(0, rax);
1340         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, deoptimize), rax);
1341         oop_maps = new OopMapSet();

1023           __ set_info("fast new_instance", dont_gc_arguments);
1024         } else {
1025           assert(id == fast_new_instance_init_check_id, "bad StubID");
1026           __ set_info("fast new_instance init check", dont_gc_arguments);
1027         }
1028 
1029         __ enter();
1030         OopMap* map = save_live_registers(sasm, 2);
1031         int call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass);
1032         oop_maps = new OopMapSet();
1033         oop_maps->add_gc_map(call_offset, map);
1034         restore_live_registers_except_rax(sasm);
1035         __ verify_oop(obj);
1036         __ leave();
1037         __ ret(0);
1038 
1039         // rax,: new instance
1040       }
1041 
1042       break;
1043 #ifdef _LP64
1044     case load_klass_id:
1045       {
1046         StubFrame f(sasm, "load_klass", dont_gc_arguments);
1047         sasm->save_live_registers_no_oop_map(true);
1048         f.load_argument(0, c_rarg0); // obj
1049         __ call_VM_leaf(CAST_FROM_FN_PTR(address, oopDesc::load_nklass_runtime), c_rarg0);
1050         sasm->restore_live_registers_except_rax(true);
1051       }
1052       break;
1053 #endif
1054     case counter_overflow_id:
1055       {
1056         Register bci = rax, method = rbx;
1057         __ enter();
1058         OopMap* map = save_live_registers(sasm, 3);
1059         // Retrieve bci
1060         __ movl(bci, Address(rbp, 2*BytesPerWord));
1061         // And a pointer to the Method*
1062         __ movptr(method, Address(rbp, 3*BytesPerWord));
1063         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, counter_overflow), bci, method);
1064         oop_maps = new OopMapSet();
1065         oop_maps->add_gc_map(call_offset, map);
1066         restore_live_registers(sasm);
1067         __ leave();
1068         __ ret(0);
1069       }
1070       break;
1071 
1072     case new_type_array_id:
1073     case new_object_array_id:

1286         __ pop(rsi);
1287         __ pop(rdi);
1288         __ ret(0);
1289 
1290         __ bind(miss);
1291         __ movptr(Address(rsp, (result_off) * VMRegImpl::stack_slot_size), NULL_WORD); // result
1292         __ pop(rax);
1293         __ pop(rcx);
1294         __ pop(rsi);
1295         __ pop(rdi);
1296         __ ret(0);
1297       }
1298       break;
1299 
1300     case monitorenter_nofpu_id:
1301       save_fpu_registers = false;
1302       // fall through
1303     case monitorenter_id:
1304       {
1305         StubFrame f(sasm, "monitorenter", dont_gc_arguments);
1306         OopMap* map = save_live_registers(sasm, 2, save_fpu_registers);
1307 
1308         // Called with store_parameter and not C abi
1309 
1310         f.load_argument(0, rax); // rax,: object

1311 
1312         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorenter), rax);
1313 
1314         oop_maps = new OopMapSet();
1315         oop_maps->add_gc_map(call_offset, map);
1316         restore_live_registers(sasm, save_fpu_registers);
1317       }
1318       break;
1319 
1320     case monitorexit_nofpu_id:
1321       save_fpu_registers = false;
1322       // fall through
1323     case monitorexit_id:
1324       {
1325         StubFrame f(sasm, "monitorexit", dont_gc_arguments);
1326         OopMap* map = save_live_registers(sasm, 2, save_fpu_registers);
1327 
1328         // Called with store_parameter and not C abi
1329 
1330         f.load_argument(0, rax); // rax: obj
1331 
1332         // note: really a leaf routine but must setup last java sp
1333         //       => use call_RT for now (speed can be improved by
1334         //       doing last java sp setup manually)
1335         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, monitorexit), rax);
1336 
1337         oop_maps = new OopMapSet();
1338         oop_maps->add_gc_map(call_offset, map);
1339         restore_live_registers(sasm, save_fpu_registers);
1340       }
1341       break;
1342 
1343     case deoptimize_id:
1344       {
1345         StubFrame f(sasm, "deoptimize", dont_gc_arguments);
1346         const int num_rt_args = 2;  // thread, trap_request
1347         OopMap* oop_map = save_live_registers(sasm, num_rt_args);
1348         f.load_argument(0, rax);
1349         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, deoptimize), rax);
1350         oop_maps = new OopMapSet();
< prev index next >