diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2015-09-22 00:46:21 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2015-09-22 00:46:21 +0000 |
| commit | 1f22a34409b2ecaffd5b982eb24247126979801b (patch) | |
| tree | 57c0887424de6ba20d599dfa2d2b036d6f21674e /clang/lib/Headers | |
| parent | 3c9c8338d0b6ec43cdaedeaeab26996ebd6982b4 (diff) | |
| download | bcm5719-llvm-1f22a34409b2ecaffd5b982eb24247126979801b.tar.gz bcm5719-llvm-1f22a34409b2ecaffd5b982eb24247126979801b.zip | |
ms Intrin.h: Fix __movsw's and __stosw's inline asm.
Before, clang's internal assembler would reject the inline asm in clang's
Intrin.h. To make sure this doesn't happen for other Intrin.h functions using
__asm__ blocks, add 32-bit and 64-bit codegen tests for Intrin.h.
Sadly, these tests discovered that __readcr3 and __writecr3 have bad
implementations in 64-bit builds. This will have to be fixed in a follow-up.
llvm-svn: 248234
Diffstat (limited to 'clang/lib/Headers')
| -rw-r--r-- | clang/lib/Headers/Intrin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Headers/Intrin.h b/clang/lib/Headers/Intrin.h index fc852dcf14b..b3bd1dca911 100644 --- a/clang/lib/Headers/Intrin.h +++ b/clang/lib/Headers/Intrin.h @@ -846,7 +846,7 @@ __movsd(unsigned long *__dst, unsigned long const *__src, size_t __n) { } static __inline__ void __DEFAULT_FN_ATTRS __movsw(unsigned short *__dst, unsigned short const *__src, size_t __n) { - __asm__("rep movsh" : : "D"(__dst), "S"(__src), "c"(__n) + __asm__("rep movsw" : : "D"(__dst), "S"(__src), "c"(__n) : "%edi", "%esi", "%ecx"); } static __inline__ void __DEFAULT_FN_ATTRS @@ -861,7 +861,7 @@ __stosd(unsigned long *__dst, unsigned long __x, size_t __n) { } static __inline__ void __DEFAULT_FN_ATTRS __stosw(unsigned short *__dst, unsigned short __x, size_t __n) { - __asm__("rep stosh" : : "D"(__dst), "a"(__x), "c"(__n) + __asm__("rep stosw" : : "D"(__dst), "a"(__x), "c"(__n) : "%edi", "%ecx"); } #endif |

