Mercurial > hg > truffle
comparison src/cpu/sparc/vm/assembler_sparc.hpp @ 644:c517646eef23
6813212: factor duplicated assembly code for general subclass check (for 6655638)
Summary: Code in interp_masm, stubGenerator, c1_LIRAssembler, and AD files moved into MacroAssembler.
Reviewed-by: kvn
author | jrose |
---|---|
date | Fri, 13 Mar 2009 18:39:22 -0700 |
parents | 9adddb8c0fc8 |
children | c89f86385056 |
comparison
equal
deleted
inserted
replaced
643:c771b7f43bbf | 644:c517646eef23 |
---|---|
2325 RegisterConstant itable_index, | 2325 RegisterConstant itable_index, |
2326 Register method_result, | 2326 Register method_result, |
2327 Register temp_reg, Register temp2_reg, | 2327 Register temp_reg, Register temp2_reg, |
2328 Label& no_such_interface); | 2328 Label& no_such_interface); |
2329 | 2329 |
2330 // Test sub_klass against super_klass, with fast and slow paths. | |
2331 | |
2332 // The fast path produces a tri-state answer: yes / no / maybe-slow. | |
2333 // One of the three labels can be NULL, meaning take the fall-through. | |
2334 // If super_check_offset is -1, the value is loaded up from super_klass. | |
2335 // No registers are killed, except temp_reg and temp2_reg. | |
2336 // If super_check_offset is not -1, temp2_reg is not used and can be noreg. | |
2337 void check_klass_subtype_fast_path(Register sub_klass, | |
2338 Register super_klass, | |
2339 Register temp_reg, | |
2340 Register temp2_reg, | |
2341 Label* L_success, | |
2342 Label* L_failure, | |
2343 Label* L_slow_path, | |
2344 RegisterConstant super_check_offset = RegisterConstant(-1), | |
2345 Register instanceof_hack = noreg); | |
2346 | |
2347 // The rest of the type check; must be wired to a corresponding fast path. | |
2348 // It does not repeat the fast path logic, so don't use it standalone. | |
2349 // The temp_reg can be noreg, if no temps are available. | |
2350 // It can also be sub_klass or super_klass, meaning it's OK to kill that one. | |
2351 // Updates the sub's secondary super cache as necessary. | |
2352 void check_klass_subtype_slow_path(Register sub_klass, | |
2353 Register super_klass, | |
2354 Register temp_reg, | |
2355 Register temp2_reg, | |
2356 Register temp3_reg, | |
2357 Register temp4_reg, | |
2358 Label* L_success, | |
2359 Label* L_failure); | |
2360 | |
2361 // Simplified, combined version, good for typical uses. | |
2362 // Falls through on failure. | |
2363 void check_klass_subtype(Register sub_klass, | |
2364 Register super_klass, | |
2365 Register temp_reg, | |
2366 Register temp2_reg, | |
2367 Label& L_success); | |
2368 | |
2369 | |
2330 // Stack overflow checking | 2370 // Stack overflow checking |
2331 | 2371 |
2332 // Note: this clobbers G3_scratch | 2372 // Note: this clobbers G3_scratch |
2333 void bang_stack_with_offset(int offset) { | 2373 void bang_stack_with_offset(int offset) { |
2334 // stack grows down, caller passes positive offset | 2374 // stack grows down, caller passes positive offset |