prefetch_linux_ppc.inline.hpp revision 10049:73443d24e529
142629Sobrien/* 238494Sobrien * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 338494Sobrien * Copyright (c) 2012, 2013 SAP SE. All rights reserved. 438494Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 542629Sobrien * 638494Sobrien * This code is free software; you can redistribute it and/or modify it 742629Sobrien * under the terms of the GNU General Public License version 2 only, as 838494Sobrien * published by the Free Software Foundation. 938494Sobrien * 1038494Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT 1138494Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1238494Sobrien * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1338494Sobrien * version 2 for more details (a copy is included in the LICENSE file that 1438494Sobrien * accompanied this code). 1538494Sobrien * 1638494Sobrien * You should have received a copy of the GNU General Public License version 1738494Sobrien * 2 along with this work; if not, write to the Free Software Foundation, 1838494Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1938494Sobrien * 2038494Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2138494Sobrien * or visit www.oracle.com if you need additional information or have any 2238494Sobrien * questions. 2338494Sobrien * 2438494Sobrien */ 2538494Sobrien 2638494Sobrien#ifndef OS_CPU_LINUX_PPC_VM_PREFETCH_LINUX_PPC_INLINE_HPP 2738494Sobrien#define OS_CPU_LINUX_PPC_VM_PREFETCH_LINUX_PPC_INLINE_HPP 2838494Sobrien 2938494Sobrien#include "runtime/prefetch.hpp" 3038494Sobrien 3138494Sobrien 3238494Sobrieninline void Prefetch::read(void *loc, intx interval) { 3338494Sobrien __asm__ __volatile__ ( 3438494Sobrien " dcbt 0, %0 \n" 3538494Sobrien : 3638494Sobrien : /*%0*/"r" ( ((address)loc) +((long)interval) ) 3738494Sobrien //: 3838494Sobrien ); 3938494Sobrien} 4038494Sobrien 4138494Sobrieninline void Prefetch::write(void *loc, intx interval) { 4238494Sobrien __asm__ __volatile__ ( 4338494Sobrien " dcbtst 0, %0 \n" 4438494Sobrien : 4538494Sobrien : /*%0*/"r" ( ((address)loc) +((long)interval) ) 4638494Sobrien //: 4738494Sobrien ); 4838494Sobrien} 4938494Sobrien 5038494Sobrien#endif // OS_CPU_LINUX_PPC_VM_PREFETCH_LINUX_PPC_INLINE_HPP 5138494Sobrien