Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 848:fe95187e8882
6859338: amd64 native unverified entry point pushes values before implicit null check
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Mon, 13 Jul 2009 14:58:17 -0700 |
parents | 69aefafe69c1 |
children | e66fd840cb6b |
comparison
equal
deleted
inserted
replaced
834:0f2d888530e7 | 848:fe95187e8882 |
---|---|
1300 // as far as the interpreter and the compiler(s) are concerned. | 1300 // as far as the interpreter and the compiler(s) are concerned. |
1301 | 1301 |
1302 | 1302 |
1303 const Register ic_reg = rax; | 1303 const Register ic_reg = rax; |
1304 const Register receiver = j_rarg0; | 1304 const Register receiver = j_rarg0; |
1305 const Register tmp = rdx; | |
1306 | 1305 |
1307 Label ok; | 1306 Label ok; |
1308 Label exception_pending; | 1307 Label exception_pending; |
1309 | 1308 |
1309 assert_different_registers(ic_reg, receiver, rscratch1); | |
1310 __ verify_oop(receiver); | 1310 __ verify_oop(receiver); |
1311 __ push(tmp); // spill (any other registers free here???) | 1311 __ load_klass(rscratch1, receiver); |
1312 __ load_klass(tmp, receiver); | 1312 __ cmpq(ic_reg, rscratch1); |
1313 __ cmpq(ic_reg, tmp); | |
1314 __ jcc(Assembler::equal, ok); | 1313 __ jcc(Assembler::equal, ok); |
1315 | 1314 |
1316 __ pop(tmp); | |
1317 __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub())); | 1315 __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub())); |
1318 | 1316 |
1319 __ bind(ok); | 1317 __ bind(ok); |
1320 __ pop(tmp); | |
1321 | 1318 |
1322 // Verified entry point must be aligned | 1319 // Verified entry point must be aligned |
1323 __ align(8); | 1320 __ align(8); |
1324 | 1321 |
1325 int vep_offset = ((intptr_t)__ pc()) - start; | 1322 int vep_offset = ((intptr_t)__ pc()) - start; |