You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

/*
* Copyright 2002-2019 Intel Corporation.
*
* This software is provided to you as Sample Source Code as defined in the accompanying
* End User License Agreement for the Intel(R) Software Development Products ("Agreement")
* section 1.L.
*
* This software and the related documents are provided as is, with no express or implied
* warranties, other than those that are expressly stated in the License.
*/
#include <asm_macros.h>
.data
.extern funcPtr
.text
DECLARE_FUNCTION(ClFlushFunc)
DECLARE_FUNCTION(ClFlushOptFunc)
DECLARE_FUNCTION(ClwbFunc)
# void ClFlushFunc();
# This function calls clflush
.global NAME(ClFlushFunc)
NAME(ClFlushFunc):
mov PIC_VAR(funcPtr), GCX_REG
#clflush (GCX_REG)
.byte 0x0F, 0xAE, 0x39
ret
# void ClFlushOptFunc();
# This function calls clflushopt
.global NAME(ClFlushOptFunc)
NAME(ClFlushOptFunc):
mov PIC_VAR(funcPtr), GCX_REG
#clflushopt (GCX_REG)
.byte 0x66, 0x0F, 0xAE, 0x39
ret
# void ClwbFunc();
# This function calls clwb
.global NAME(ClwbFunc)
NAME(ClwbFunc):
mov PIC_VAR(funcPtr), GCX_REG
#clwb (GCX_REG)
.byte 0x66, 0x0F, 0xAE, 0x31
ret