diff options
| author | Eric Christopher <echristo@gmail.com> | 2017-03-20 22:31:33 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2017-03-20 22:31:33 +0000 |
| commit | 5ba576ffe6ab3c81479b29ed8e6bbf90fae8f037 (patch) | |
| tree | 23150bab167777e41f101e92c06eb0001b0f5b4d /clang/lib | |
| parent | f238902f52246b3a3affcbec0bb4593eb8619bfb (diff) | |
| download | bcm5719-llvm-5ba576ffe6ab3c81479b29ed8e6bbf90fae8f037.tar.gz bcm5719-llvm-5ba576ffe6ab3c81479b29ed8e6bbf90fae8f037.zip | |
Fix parsing of htmxlintrin.h in C++ mode
- Fix a variable naming mismatch
- Fix gcc extension pointer arithmetic on void to cast to char *.
- Test that the header (and htmintrin.h) parse.
llvm-svn: 298318
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Headers/htmxlintrin.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/clang/lib/Headers/htmxlintrin.h b/clang/lib/Headers/htmxlintrin.h index 16dc7056c6b..28f7d025bb3 100644 --- a/clang/lib/Headers/htmxlintrin.h +++ b/clang/lib/Headers/htmxlintrin.h @@ -35,14 +35,10 @@ extern "C" { #endif -#define _TEXASR_PTR(TM_BUF) \ - ((texasr_t *)((TM_BUF)+0)) -#define _TEXASRU_PTR(TM_BUF) \ - ((texasru_t *)((TM_BUF)+0)) -#define _TEXASRL_PTR(TM_BUF) \ - ((texasrl_t *)((TM_BUF)+4)) -#define _TFIAR_PTR(TM_BUF) \ - ((tfiar_t *)((TM_BUF)+8)) +#define _TEXASR_PTR(TM_BUF) ((texasr_t *)((char *)(TM_BUF) + 0)) +#define _TEXASRU_PTR(TM_BUF) ((texasru_t *)((char *)(TM_BUF) + 0)) +#define _TEXASRL_PTR(TM_BUF) ((texasrl_t *)((char *)(TM_BUF) + 4)) +#define _TFIAR_PTR(TM_BUF) ((tfiar_t *)((char *)(TM_BUF) + 8)) typedef char TM_buff_type[16]; @@ -178,7 +174,7 @@ extern __inline long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) __TM_is_conflict(void* const __TM_buff) { - texasru_t texasru = *_TEXASRU_PTR (TM_buff); + texasru_t texasru = *_TEXASRU_PTR (__TM_buff); /* Return TEXASR bits 11 (Self-Induced Conflict) through 14 (Translation Invalidation Conflict). */ return (_TEXASRU_EXTRACT_BITS (texasru, 14, 4)) ? 1 : 0; |

