diff options
author | Johan Mattsson <[email protected]> | 2022-11-23 22:37:37 +0100 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2022-11-24 15:48:02 +0900 |
commit | 1bfbd8c4dca678049a45364f689ce0b3aac83ac1 (patch) | |
tree | 8260040f11f95740913dae5c3c07e8187f4f211d | |
parent | 0ecef5c2847959192ca677a27faf08255055db42 (diff) | |
download | xbyak-1bfbd8c4dca678049a45364f689ce0b3aac83ac1.tar.gz xbyak-1bfbd8c4dca678049a45364f689ce0b3aac83ac1.zip |
Fix incorrect format strings
-rw-r--r-- | sample/quantize.cpp | 2 | ||||
-rw-r--r-- | sample/toyvm.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sample/quantize.cpp b/sample/quantize.cpp index 6bdf0d0..ba0fd22 100644 --- a/sample/quantize.cpp +++ b/sample/quantize.cpp @@ -199,7 +199,7 @@ int main(int argc, char *argv[]) quantize2(dest2, src, qTbl); for (int i = 0; i < N; i++) { if (dest[i] != dest2[i]) { - printf("err[%d] %d %d\n", i, dest[i], dest2[i]); + printf("err[%d] %u %u\n", i, dest[i], dest2[i]); } } diff --git a/sample/toyvm.cpp b/sample/toyvm.cpp index 1e558ff..0d97fa6 100644 --- a/sample/toyvm.cpp +++ b/sample/toyvm.cpp @@ -5,8 +5,8 @@ mem_ 4byte x 65536 - ���٤Ƥ�̿���4byte���� - ¨�ͤ�����16bit + すべての命令は4byte固定 + 即値は全て16bit R = A or B vldiR, imm ; R = imm @@ -109,7 +109,7 @@ public: reg[r] -= imm; break; case PUT: - printf("%c %8d(0x%08x)\n", 'A' + r, reg[r], reg[r]); + printf("%c %8u(0x%08x)\n", 'A' + r, reg[r], reg[r]); break; case JNZ: if (reg[r] != 0) pc += static_cast<signed short>(imm); @@ -294,7 +294,7 @@ lp: p = t; n--; if (n != 0) goto lp; - printf("c=%d(0x%08x)\n", c, c); + printf("c=%u(0x%08x)\n", c, c); } int main() |