We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
背景 Memory Mapped I/O (MMIO) 領域のアドレス値をCプリプロセッサ定数定義する場合に 即値に定数サフィックス(L, UL, LL, ULL)を設定することがある。これらのマクロをアセンブラ言語とCの双方で利用可能にしたい。
要望内容 Cプリプロセッサのマクロにより
#define REG_ADDR ULONGLONG_C(0x8000)
のように定数の大きさを定義したい。
その他 以下のようなマクロを導入すれば良い
#if !defined(_MACRO_ONLY) /** 符号付き整数定数 @param[in] _v 整数値 */ #define INT_C(_v) ( _v ) /** 符号付きロング整数定数 @param[in] _v 整数値 */ #define LONG_C(_v) ( _v ## L ) /** 符号付きロングロング整数定数 @param[in] _v 整数値 */ #define LONGLONG_C(_v) ( _v ## LL ) /** 符号なし整数定数 @param[in] _v 整数値 */ #define UINT_C(_v) ( _v ## U ) /** 符号なしロング整数定数 @param[in] _v 整数値 */ #define ULONG_C(_v) ( _v ## UL ) /** 符号なしロングロング整数定数 @param[in] _v 整数値 */ #define ULONGLONG_C(_v) ( _v ## ULL ) #else /** 符号付き整数定数 (アセンブラファイル用) @param[in] _v 整数値 */ #define INT_C(_v) ( _v ) /** 符号付きロング整数定数 (アセンブラファイル用) @param[in] _v 整数値 */ #define LONG_C(_v) ( _v ) /** 符号付きロングロング整数定数 (アセンブラファイル用) @param[in] _v 整数値 */ #define LONGLONG_C(_v) ( _v ) #endif /* !_MACRO_ONLY */
The text was updated successfully, but these errors were encountered:
No branches or pull requests
背景
Memory Mapped I/O (MMIO) 領域のアドレス値をCプリプロセッサ定数定義する場合に
即値に定数サフィックス(L, UL, LL, ULL)を設定することがある。これらのマクロをアセンブラ言語とCの双方で利用可能にしたい。
要望内容
Cプリプロセッサのマクロにより
のように定数の大きさを定義したい。
その他
以下のようなマクロを導入すれば良い
The text was updated successfully, but these errors were encountered: