src/cpu/x86/vm/c1_Runtime1_x86.cpp

Print this page
rev 4136 : 7153771: array bound check elimination for c1
Summary: when possible optimize out array bound checks, inserting predicates when needed.
Reviewed-by:


1790 #ifdef _LP64
1791 #  ifndef _WIN64
1792         __ pop(rsi);
1793         __ pop(rdi);
1794 #  endif
1795         __ pop(r11);
1796         __ pop(r10);
1797         __ pop(r9);
1798         __ pop(r8);
1799 #endif
1800         __ pop(rdx);
1801         __ bind(done);
1802 
1803         __ pop(rcx);
1804         __ pop(rax);
1805 
1806       }
1807       break;
1808 #endif // INCLUDE_ALL_GCS
1809 


















1810     default:
1811       { StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);
1812         __ movptr(rax, (int)id);
1813         __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
1814         __ should_not_reach_here();
1815       }
1816       break;
1817   }
1818   return oop_maps;
1819 }
1820 
1821 #undef __
1822 
1823 const char *Runtime1::pd_name_for_address(address entry) {
1824   return "<unknown function>";
1825 }


1790 #ifdef _LP64
1791 #  ifndef _WIN64
1792         __ pop(rsi);
1793         __ pop(rdi);
1794 #  endif
1795         __ pop(r11);
1796         __ pop(r10);
1797         __ pop(r9);
1798         __ pop(r8);
1799 #endif
1800         __ pop(rdx);
1801         __ bind(done);
1802 
1803         __ pop(rcx);
1804         __ pop(rax);
1805 
1806       }
1807       break;
1808 #endif // INCLUDE_ALL_GCS
1809 
1810     case predicate_failed_trap_id:
1811       { 
1812         StubFrame f(sasm, "predicate_failed_trap", dont_gc_arguments);
1813         
1814         OopMap* map = save_live_registers(sasm, 1);
1815 
1816         int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, predicate_failed_trap));
1817         oop_maps = new OopMapSet();
1818         oop_maps->add_gc_map(call_offset, map);
1819         restore_live_registers(sasm);
1820         __ leave();
1821         DeoptimizationBlob* deopt_blob = SharedRuntime::deopt_blob();
1822         assert(deopt_blob != NULL, "deoptimization blob must have been created");
1823 
1824         __ jump(RuntimeAddress(deopt_blob->unpack_with_reexecution()));
1825       }
1826       break;
1827 
1828     default:
1829       { StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);
1830         __ movptr(rax, (int)id);
1831         __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
1832         __ should_not_reach_here();
1833       }
1834       break;
1835   }
1836   return oop_maps;
1837 }
1838 
1839 #undef __
1840 
1841 const char *Runtime1::pd_name_for_address(address entry) {
1842   return "<unknown function>";
1843 }