diff options
author | Junyan He <junyan.he@linux.intel.com> | 2014-06-24 23:33:20 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-06-24 23:34:46 +0800 |
commit | 8cc0f05202749e305b804fe7f952b4f79ab06975 (patch) | |
tree | 3f9a5d98a108e0a7fa1f38ad26bfc1ad3119cc88 /backend/src/ir | |
parent | 1a64ca328fdcd7c5f60e73b19938f945d0b2fc7b (diff) |
Implement the %p in the printf
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'backend/src/ir')
-rw-r--r-- | backend/src/ir/printf.cpp | 3 | ||||
-rw-r--r-- | backend/src/ir/printf.hpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/backend/src/ir/printf.cpp b/backend/src/ir/printf.cpp index 68b2ce48..9d604021 100644 --- a/backend/src/ir/printf.cpp +++ b/backend/src/ir/printf.cpp @@ -193,6 +193,9 @@ namespace gbe case PRINTF_CONVERSION_a: PRINT_SOMETHING(float, a); break; + case PRINTF_CONVERSION_P: + PRINT_SOMETHING(int, p); + break; case PRINTF_CONVERSION_S: pf_str = pf_str + "s"; diff --git a/backend/src/ir/printf.hpp b/backend/src/ir/printf.hpp index 680b8e6b..1aef767f 100644 --- a/backend/src/ir/printf.hpp +++ b/backend/src/ir/printf.hpp @@ -196,7 +196,8 @@ namespace gbe case PRINTF_CONVERSION_U: case PRINTF_CONVERSION_X: case PRINTF_CONVERSION_x: - /* Char will be aligned to sizeof(int) here. */ + case PRINTF_CONVERSION_P: + /* Char will be aligned to sizeof(int) here. */ case PRINTF_CONVERSION_C: return (uint32_t)(sizeof(int) * vec_num); case PRINTF_CONVERSION_E: |