diff options
Diffstat (limited to 'arch/s390/include/asm/fpu-insn.h')
-rw-r--r-- | arch/s390/include/asm/fpu-insn.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/s390/include/asm/fpu-insn.h b/arch/s390/include/asm/fpu-insn.h index 538201864a47..803ce4e2aab4 100644 --- a/arch/s390/include/asm/fpu-insn.h +++ b/arch/s390/include/asm/fpu-insn.h @@ -110,7 +110,8 @@ static __always_inline void fpu_stfpc(unsigned int *fpc) #ifdef CONFIG_CC_IS_CLANG -#define fpu_vlm(_v1, _v3, _vxrs) do { \ +#define fpu_vlm(_v1, _v3, _vxrs) \ +({ \ unsigned int size = ((_v3) - (_v1) + 1) * sizeof(__vector128); \ struct { \ __vector128 _v[(_v3) - (_v1) + 1]; \ @@ -124,11 +125,13 @@ static __always_inline void fpu_stfpc(unsigned int *fpc) : [vxrs] "R" (*_v), \ [v1] "I" (_v1), [v3] "I" (_v3) \ : "memory", "1"); \ -} while (0) + (_v3) - (_v1) + 1; \ +}) #else /* CONFIG_CC_IS_CLANG */ -#define fpu_vlm(_v1, _v3, _vxrs) do { \ +#define fpu_vlm(_v1, _v3, _vxrs) \ +({ \ unsigned int size = ((_v3) - (_v1) + 1) * sizeof(__vector128); \ struct { \ __vector128 _v[(_v3) - (_v1) + 1]; \ @@ -140,13 +143,15 @@ static __always_inline void fpu_stfpc(unsigned int *fpc) : [vxrs] "Q" (*_v), \ [v1] "I" (_v1), [v3] "I" (_v3) \ : "memory"); \ -} while (0) + (_v3) - (_v1) + 1; \ +}) #endif /* CONFIG_CC_IS_CLANG */ #ifdef CONFIG_CC_IS_CLANG -#define fpu_vstm(_v1, _v3, _vxrs) do { \ +#define fpu_vstm(_v1, _v3, _vxrs) \ +({ \ unsigned int size = ((_v3) - (_v1) + 1) * sizeof(__vector128); \ struct { \ __vector128 _v[(_v3) - (_v1) + 1]; \ @@ -159,11 +164,13 @@ static __always_inline void fpu_stfpc(unsigned int *fpc) : [vxrs] "=R" (*_v) \ : [v1] "I" (_v1), [v3] "I" (_v3) \ : "memory", "1"); \ -} while (0) + (_v3) - (_v1) + 1; \ +}) #else /* CONFIG_CC_IS_CLANG */ -#define fpu_vstm(_v1, _v3, _vxrs) do { \ +#define fpu_vstm(_v1, _v3, _vxrs) \ +({ \ unsigned int size = ((_v3) - (_v1) + 1) * sizeof(__vector128); \ struct { \ __vector128 _v[(_v3) - (_v1) + 1]; \ @@ -174,7 +181,8 @@ static __always_inline void fpu_stfpc(unsigned int *fpc) : [vxrs] "=Q" (*_v) \ : [v1] "I" (_v1), [v3] "I" (_v3) \ : "memory"); \ -} while (0) + (_v3) - (_v1) + 1; \ +}) #endif /* CONFIG_CC_IS_CLANG */ |