src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
changeset 52351 0ecb4e520110
parent 52302 912b79d983d9
child 52460 f1bb77833b59
--- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp	Mon Oct 29 11:31:25 2018 -0700
+++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp	Tue Oct 30 10:39:19 2018 -0400
@@ -78,7 +78,7 @@
 
 // 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")
+#define SPELL_REG_FP "fp"
 #endif
 
 address os::current_stack_pointer() {
@@ -91,15 +91,6 @@
   return (char*) -1;
 }
 
-#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
@@ -115,7 +106,6 @@
 
 #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;
@@ -256,13 +246,11 @@
 #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;
 
@@ -282,8 +270,8 @@
 
   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
+       || info->si_addr == (caddr_t)check_vfp3_32_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);
@@ -508,9 +496,6 @@
 }
 
 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 (
@@ -519,7 +504,6 @@
     : /* no output */ : /* no input */ : "r0"
   );
 #endif
-#endif // AARCH64
 }
 
 bool os::is_allocatable(size_t bytes) {
@@ -555,14 +539,8 @@
     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);
@@ -591,16 +569,10 @@
     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*);
 
@@ -710,7 +682,6 @@
   return old_value;
 }
 
-#endif // !AARCH64
 
 #ifndef PRODUCT
 void os::verify_stack_alignment() {