From 9a08847e6de438628c63f4306a85718063ca8f17 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 17 Jul 2014 20:25:36 +0000 Subject: [PATCH] Add a test for PR20343 after llvm r213303. llvm-svn: 213305 --- clang/test/CodeGen/ms-inline-asm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index 3b55b50..e08803c 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -476,3 +476,19 @@ void t40(float a) { // CHECK: call void asm sideeffect inteldialect "fld dword ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(float* {{.*}}) // CHECK: call void asm sideeffect inteldialect "fistp dword ptr $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* {{.*}}) } + +void t41(unsigned short a) { + __asm mov cs, a; + __asm mov ds, a; + __asm mov es, a; + __asm mov fs, a; + __asm mov gs, a; + __asm mov ss, a; + // CHECK-LABEL: define void @t41 + // CHECK: call void asm sideeffect inteldialect "mov cs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* %a.addr) + // CHECK: call void asm sideeffect inteldialect "mov ds, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* %a.addr) + // CHECK: call void asm sideeffect inteldialect "mov es, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* %a.addr) + // CHECK: call void asm sideeffect inteldialect "mov fs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* %a.addr) + // CHECK: call void asm sideeffect inteldialect "mov gs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* %a.addr) + // CHECK: call void asm sideeffect inteldialect "mov ss, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* %a.addr) +} -- 2.7.4