mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
6b866e2b9c
Differential Revision: https://reviews.llvm.org/D21958 llvm-svn: 278782
21 lines
535 B
LLVM
21 lines
535 B
LLVM
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+xsave | FileCheck %s
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xsave | FileCheck %s --check-prefix=CHECK64
|
|
|
|
define i64 @test_xgetbv(i32 %in) {
|
|
; CHECK-LABEL: test_xgetbv
|
|
; CHECK: movl 4(%esp), %ecx
|
|
; CHECK: xgetbv
|
|
; CHECK: ret
|
|
|
|
; CHECK64-LABEL: test_xgetbv
|
|
; CHECK64: movl %edi, %ecx
|
|
; CHECK64: xgetbv
|
|
; CHECK64: shlq $32, %rdx
|
|
; CHECK64: orq %rdx, %rax
|
|
; CHECK64: ret
|
|
|
|
%1 = call i64 @llvm.x86.xgetbv(i32 %in)
|
|
ret i64 %1;
|
|
}
|
|
|
|
declare i64 @llvm.x86.xgetbv(i32) |