src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp	Mon Sep 17 10:30:58 2018
--- new/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp	Mon Sep 17 10:30:57 2018

*** 76,86 **** --- 76,86 ---- #define SPELL_REG_SP "sp" // Don't #define SPELL_REG_FP for thumb because it is not safe to use, so this makes sure we never fetch it. #ifndef __thumb__ ! #define SPELL_REG_FP AARCH64_ONLY("x29") NOT_AARCH64("fp") #endif address os::current_stack_pointer() { register address sp __asm__ (SPELL_REG_SP); return sp;
*** 93,111 **** --- 93,102 ---- void os::initialize_thread(Thread* thr) { // Nothing to do } #ifdef AARCH64 #define arm_pc pc #define arm_sp sp #define arm_fp regs[29] #define arm_r0 regs[0] #define ARM_REGS_IN_CONTEXT 31 #else #if NGREG == 16 // These definitions are based on the observation that until // the certain version of GCC mcontext_t was defined as // a structure containing gregs[NGREG] array with 16 elements.
*** 117,127 **** --- 108,117 ---- #define arm_r0 gregs[0] #endif #define ARM_REGS_IN_CONTEXT 16 #endif // AARCH64 address os::Linux::ucontext_get_pc(const ucontext_t* uc) { return (address)uc->uc_mcontext.arm_pc; }
*** 258,274 **** --- 248,262 ---- // return frame for our caller's caller return os::get_sender_for_C_frame(&caller_frame); #endif } #ifndef AARCH64 extern "C" address check_vfp_fault_instr; extern "C" address check_vfp3_32_fault_instr; address check_vfp_fault_instr = NULL; address check_vfp3_32_fault_instr = NULL; #endif // !AARCH64 extern "C" address check_simd_fault_instr; address check_simd_fault_instr = NULL; // Utility functions
*** 284,295 **** --- 272,283 ---- SignalHandlerMark shm(t); if (sig == SIGILL && ((info->si_addr == (caddr_t)check_simd_fault_instr) NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp_fault_instr) ! NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp3_32_fault_instr))) { + || info->si_addr == (caddr_t)check_vfp_fault_instr // skip faulty instruction + instruction that sets return value to // success and set return value to failure. os::Linux::ucontext_set_pc(uc, (address)info->si_addr + 8); uc->uc_mcontext.arm_r0 = 0; return true;
*** 510,531 **** --- 498,515 ---- void os::Linux::set_fpu_control_word(int fpu_control) { // Nothing to do } void os::setup_fpu() { #ifdef AARCH64 __asm__ volatile ("msr fpcr, xzr"); #else #if !defined(__SOFTFP__) && defined(__VFP_FP__) // Turn on IEEE-754 compliant VFP mode __asm__ volatile ( "mov %%r0, #0;" "fmxr fpscr, %%r0" : /* no output */ : /* no input */ : "r0" ); #endif #endif // AARCH64 } bool os::is_allocatable(size_t bytes) { return true; }
*** 557,574 **** --- 541,552 ---- intx* reg_area = (intx*)&uc->uc_mcontext.arm_r0; for (int r = 0; r < ARM_REGS_IN_CONTEXT; r++) { st->print_cr(" %-3s = " INTPTR_FORMAT, as_Register(r)->name(), reg_area[r]); } #define U64_FORMAT "0x%016llx" #ifdef AARCH64 st->print_cr(" %-3s = " U64_FORMAT, "sp", uc->uc_mcontext.sp); st->print_cr(" %-3s = " U64_FORMAT, "pc", uc->uc_mcontext.pc); st->print_cr(" %-3s = " U64_FORMAT, "pstate", uc->uc_mcontext.pstate); #else // now print flag register st->print_cr(" %-4s = 0x%08lx", "cpsr",uc->uc_mcontext.arm_cpsr); #endif st->cr(); intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); st->print_cr("Top of Stack: (sp=" INTPTR_FORMAT ")", p2i(sp)); print_hex_dump(st, (address)sp, (address)(sp + 8*sizeof(intptr_t)), sizeof(intptr_t));
*** 593,612 **** --- 571,584 ---- for (int r = 0; r < ARM_REGS_IN_CONTEXT; r++) { st->print_cr(" %-3s = " INTPTR_FORMAT, as_Register(r)->name(), reg_area[r]); print_location(st, reg_area[r]); st->cr(); } #ifdef AARCH64 st->print_cr(" %-3s = " U64_FORMAT, "pc", uc->uc_mcontext.pc); print_location(st, uc->uc_mcontext.pc); st->cr(); #endif st->cr(); } #ifndef AARCH64 typedef int64_t cmpxchg_long_func_t(int64_t, int64_t, volatile int64_t*); cmpxchg_long_func_t* os::atomic_cmpxchg_long_func = os::atomic_cmpxchg_long_bootstrap;
*** 712,722 **** --- 684,693 ---- if (old_value == compare_value) *dest = exchange_value; return old_value; } #endif // !AARCH64 #ifndef PRODUCT void os::verify_stack_alignment() { } #endif

src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File