@@ -1554,31 +1554,6 @@ store_ppc_registers (const struct regcache *regcache, int tid)
15541554 function to fail most of the time, so we ignore them. */
15551555}
15561556
1557- /* Fetch the AT_HWCAP entry from the aux vector. */
1558- static CORE_ADDR
1559- ppc_linux_get_hwcap (void )
1560- {
1561- CORE_ADDR field ;
1562-
1563- if (target_auxv_search (current_top_target (), AT_HWCAP , & field ) != 1 )
1564- return 0 ;
1565-
1566- return field ;
1567- }
1568-
1569- /* Fetch the AT_HWCAP2 entry from the aux vector. */
1570-
1571- static CORE_ADDR
1572- ppc_linux_get_hwcap2 (void )
1573- {
1574- CORE_ADDR field ;
1575-
1576- if (target_auxv_search (current_top_target (), AT_HWCAP2 , & field ) != 1 )
1577- return 0 ;
1578-
1579- return field ;
1580- }
1581-
15821557/* The cached DABR value, to install in new threads.
15831558 This variable is used when the PowerPC HWDEBUG ptrace
15841559 interface is not available. */
@@ -1735,7 +1710,7 @@ ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
17351710 takes two hardware watchpoints though. */
17361711 if (len > 1
17371712 && hwdebug_info .features & PPC_DEBUG_FEATURE_DATA_BP_RANGE
1738- && ppc_linux_get_hwcap ( ) & PPC_FEATURE_BOOKE )
1713+ && linux_get_hwcap ( current_top_target () ) & PPC_FEATURE_BOOKE )
17391714 return 2 ;
17401715 /* Check if the processor provides DAWR interface. */
17411716 if (hwdebug_info .features & PPC_DEBUG_FEATURE_DATA_BP_DAWR )
@@ -1755,7 +1730,7 @@ ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
17551730 ptrace interface, DAC-based processors (i.e., embedded processors) will
17561731 use addresses aligned to 4-bytes due to the way the read/write flags are
17571732 passed in the old ptrace interface. */
1758- else if (((ppc_linux_get_hwcap ( ) & PPC_FEATURE_BOOKE )
1733+ else if (((linux_get_hwcap ( current_top_target () ) & PPC_FEATURE_BOOKE )
17591734 && (addr + len ) > (addr & ~3 ) + 4 )
17601735 || (addr + len ) > (addr & ~7 ) + 8 )
17611736 return 0 ;
@@ -2294,7 +2269,7 @@ ppc_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
22942269 long dabr_value ;
22952270 long read_mode , write_mode ;
22962271
2297- if (ppc_linux_get_hwcap ( ) & PPC_FEATURE_BOOKE )
2272+ if (linux_get_hwcap ( current_top_target () ) & PPC_FEATURE_BOOKE )
22982273 {
22992274 /* PowerPC 440 requires only the read/write flags to be passed
23002275 to the kernel. */
@@ -2497,9 +2472,9 @@ ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
24972472 int mask ;
24982473
24992474 if (have_ptrace_hwdebug_interface ()
2500- && ppc_linux_get_hwcap ( ) & PPC_FEATURE_BOOKE )
2475+ && linux_get_hwcap ( current_top_target () ) & PPC_FEATURE_BOOKE )
25012476 return start <= addr && start + length >= addr ;
2502- else if (ppc_linux_get_hwcap ( ) & PPC_FEATURE_BOOKE )
2477+ else if (linux_get_hwcap ( current_top_target () ) & PPC_FEATURE_BOOKE )
25032478 mask = 3 ;
25042479 else
25052480 mask = 7 ;
@@ -2637,8 +2612,8 @@ ppc_linux_nat_target::read_description ()
26372612
26382613 features .wordsize = ppc_linux_target_wordsize (tid );
26392614
2640- CORE_ADDR hwcap = ppc_linux_get_hwcap ( );
2641- CORE_ADDR hwcap2 = ppc_linux_get_hwcap2 ( );
2615+ CORE_ADDR hwcap = linux_get_hwcap ( current_top_target () );
2616+ CORE_ADDR hwcap2 = linux_get_hwcap2 ( current_top_target () );
26422617
26432618 if (have_ptrace_getsetvsxregs
26442619 && (hwcap & PPC_FEATURE_HAS_VSX ))
0 commit comments