blob: 0ce2368bd20f975dde774f05dc19123fc53d77b1 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001#ifndef _ASM_POWERPC_ASM_CONST_H
2#define _ASM_POWERPC_ASM_CONST_H
3
4#ifdef __ASSEMBLY__
5# define stringify_in_c(...) __VA_ARGS__
6# define ASM_CONST(x) x
7#else
8/* This version of stringify will deal with commas... */
9# define __stringify_in_c(...) #__VA_ARGS__
10# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
11# define __ASM_CONST(x) x##UL
12# define ASM_CONST(x) __ASM_CONST(x)
13#endif
Olivier Deprez157378f2022-04-04 15:47:50 +020014
15/*
16 * Inline assembly memory constraint
17 *
18 * GCC 4.9 doesn't properly handle pre update memory constraint "m<>"
19 *
20 */
21#if defined(GCC_VERSION) && GCC_VERSION < 50000
22#define UPD_CONSTR ""
23#else
24#define UPD_CONSTR "<>"
25#endif
26
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000027#endif /* _ASM_POWERPC_ASM_CONST_H */