mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-26 22:42:46 +02:00
7b91f508e9
Add intrinsics for the XSAVE instructions (XSAVE/XSAVE64/XRSTOR/XRSTOR64) XSAVEOPT instructions (XSAVEOPT/XSAVEOPT64) XSAVEC instructions (XSAVEC/XSAVEC64) XSAVES instructions (XSAVES/XSAVES64/XRSTORS/XRSTORS64) Differential Revision: http://reviews.llvm.org/D13012 llvm-svn: 250029
42 lines
1.2 KiB
LLVM
42 lines
1.2 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xsave,+xsaves | FileCheck %s
|
|
|
|
define void @test_xsaves(i8* %ptr, i32 %hi, i32 %lo) {
|
|
; CHECK-LABEL: test_xsaves
|
|
; CHECK: movl %edx, %eax
|
|
; CHECK: movl %esi, %edx
|
|
; CHECK: xsaves (%rdi)
|
|
call void @llvm.x86.xsaves(i8* %ptr, i32 %hi, i32 %lo)
|
|
ret void;
|
|
}
|
|
declare void @llvm.x86.xsaves(i8*, i32, i32)
|
|
|
|
define void @test_xsaves64(i8* %ptr, i32 %hi, i32 %lo) {
|
|
; CHECK-LABEL: test_xsaves64
|
|
; CHECK: movl %edx, %eax
|
|
; CHECK: movl %esi, %edx
|
|
; CHECK: xsaves64 (%rdi)
|
|
call void @llvm.x86.xsaves64(i8* %ptr, i32 %hi, i32 %lo)
|
|
ret void;
|
|
}
|
|
declare void @llvm.x86.xsaves64(i8*, i32, i32)
|
|
|
|
define void @test_xrstors(i8* %ptr, i32 %hi, i32 %lo) {
|
|
; CHECK-LABEL: test_xrstors
|
|
; CHECK: movl %edx, %eax
|
|
; CHECK: movl %esi, %edx
|
|
; CHECK: xrstors (%rdi)
|
|
call void @llvm.x86.xrstors(i8* %ptr, i32 %hi, i32 %lo)
|
|
ret void;
|
|
}
|
|
declare void @llvm.x86.xrstors(i8*, i32, i32)
|
|
|
|
define void @test_xrstors64(i8* %ptr, i32 %hi, i32 %lo) {
|
|
; CHECK-LABEL: test_xrstors64
|
|
; CHECK: movl %edx, %eax
|
|
; CHECK: movl %esi, %edx
|
|
; CHECK: xrstors64 (%rdi)
|
|
call void @llvm.x86.xrstors64(i8* %ptr, i32 %hi, i32 %lo)
|
|
ret void;
|
|
}
|
|
declare void @llvm.x86.xrstors64(i8*, i32, i32)
|