1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+usermsr | FileCheck %s --check-prefixes=X64
4 define i64 @test_int_x86_urdmsr(i64 %A) nounwind {
5 ; X64-LABEL: test_int_x86_urdmsr:
7 ; X64-NEXT: urdmsr %rdi, %rax # encoding: [0xf2,0x0f,0x38,0xf8,0xc7]
8 ; X64-NEXT: retq # encoding: [0xc3]
9 %ret = call i64 @llvm.x86.urdmsr(i64 %A)
13 define i64 @test_int_x86_urdmsr_const() nounwind {
14 ; X64-LABEL: test_int_x86_urdmsr_const:
16 ; X64-NEXT: urdmsr $123, %rax # encoding: [0xc4,0xe7,0x7b,0xf8,0xc0,0x7b,0x00,0x00,0x00]
17 ; X64-NEXT: retq # encoding: [0xc3]
18 %ret = call i64 @llvm.x86.urdmsr(i64 123)
22 define i64 @test_int_x86_urdmsr_const_i64() nounwind {
23 ; X64-LABEL: test_int_x86_urdmsr_const_i64:
25 ; X64-NEXT: movabsq $8589934591, %rax # encoding: [0x48,0xb8,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00]
26 ; X64-NEXT: # imm = 0x1FFFFFFFF
27 ; X64-NEXT: urdmsr %rax, %rax # encoding: [0xf2,0x0f,0x38,0xf8,0xc0]
28 ; X64-NEXT: retq # encoding: [0xc3]
29 %ret = call i64 @llvm.x86.urdmsr(i64 8589934591)
33 declare i64 @llvm.x86.urdmsr(i64 %A)
35 define void @test_int_x86_uwrmsr(i64 %A, i64 %B) nounwind {
36 ; X64-LABEL: test_int_x86_uwrmsr:
38 ; X64-NEXT: uwrmsr %rdi, %rsi # encoding: [0xf3,0x0f,0x38,0xf8,0xfe]
39 ; X64-NEXT: retq # encoding: [0xc3]
40 call void @llvm.x86.uwrmsr(i64 %A, i64 %B)
44 define void @test_int_x86_uwrmsr_const(i64 %A) nounwind {
45 ; X64-LABEL: test_int_x86_uwrmsr_const:
47 ; X64-NEXT: uwrmsr %rdi, $123 # encoding: [0xc4,0xe7,0x7a,0xf8,0xc7,0x7b,0x00,0x00,0x00]
48 ; X64-NEXT: retq # encoding: [0xc3]
49 call void @llvm.x86.uwrmsr(i64 %A, i64 123)
53 define void @test_int_x86_uwrmsr_const_i64(i64 %A) nounwind {
54 ; X64-LABEL: test_int_x86_uwrmsr_const_i64:
56 ; X64-NEXT: movabsq $8589934591, %rax # encoding: [0x48,0xb8,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00]
57 ; X64-NEXT: # imm = 0x1FFFFFFFF
58 ; X64-NEXT: uwrmsr %rdi, %rax # encoding: [0xf3,0x0f,0x38,0xf8,0xf8]
59 ; X64-NEXT: retq # encoding: [0xc3]
60 call void @llvm.x86.uwrmsr(i64 %A, i64 8589934591)
64 declare void @llvm.x86.uwrmsr(i64 %A, i64 %B)