Commit 1b92ed9
Add ETPRIsize_t support to ExecuTorch for Xtensa (#7895)
Summary:
topic: not user facing
Our Xtensa G3's toolchain, which is as recent as RJ-2024.3 release doesn't have %zu format specifier support. Since we only have the precompiled libc.a provided from cadence -- it seems from the disassembly that only the following are supported
%c: character
%s: string
%d: decimal integer
%i: decimal integer (same as %d)
%u: unsigned decimal integer
%x: hexadecimal integer
%X: uppercase hexadecimal integer
%p: pointer
which is consistent with what I've seen come-out from ET_LOG prints that pass through the vsnprintf specifier
Haven't heard of a 64-bit Xtensa DSP, so I think this 'lu' specifier mapping should work for all Xtensa toolchains regardless of vsnprintf implementation.
This diff also updates a couple of places where I most commonly see the mishandled %zu specifier. If the changes are okay, I can more widely update print statements in ExecuTorch. It would touch a lot of files, some of which would never be compiled for Xtensa.
Differential Revision: D681312521 parent 71c0ad8 commit 1b92ed9
File tree
3 files changed
+86
-41
lines changed- runtime
- core
- executor
- platform
3 files changed
+86
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
0 commit comments