Guest User

Untitled

a guest
Jan 16th, 2023
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 155.89 KB | None | 0 0
  1. Log started at: Tue Jan 17 01:24:15 CET 2023
  2.  
  3. RetroPie-Setup version: 4.8.2 (c5e6417)
  4. System: i686 (i686) - Linux Mint 19.3 Tricia - Linux RetroArcade 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:37:04 UTC 2019 i686 i686 i686 GNU/Linux
  5.  
  6. = = = = = = = = = = = = = = = = = = = = =
  7. Installing dependencies for 'lr-pcsx-rearmed' : Playstation emulator - PCSX (arm optimised) port for libretro
  8. = = = = = = = = = = = = = = = = = = = = =
  9.  
  10. ~/RetroPie-Setup/tmp/build/lr-pcsx-rearmed ~/RetroPie-Setup
  11.  
  12. = = = = = = = = = = = = = = = = = = = = =
  13. Getting sources for 'lr-pcsx-rearmed' : Playstation emulator - PCSX (arm optimised) port for libretro
  14. = = = = = = = = = = = = = = = = = = = = =
  15.  
  16. Already on 'master'
  17. Your branch is up to date with 'origin/master'.
  18. Already up to date.
  19. HEAD is now in branch 'master' at commit 'aced3eb3fcaa0fe13c44c4dd196cdab42555fd98'
  20. ~/RetroPie-Setup
  21. ~/RetroPie-Setup/tmp/build/lr-pcsx-rearmed ~/RetroPie-Setup
  22.  
  23. = = = = = = = = = = = = = = = = = = = = =
  24. Building 'lr-pcsx-rearmed' : Playstation emulator - PCSX (arm optimised) port for libretro
  25. = = = = = = = = = = = = = = = = = = = = =
  26.  
  27. TARGET: pcsx_rearmed_libretro.so
  28. platform: unix
  29. ARCH: i686
  30. DYNAREC: lightrec
  31. BUILTIN_GPU: neon
  32. CC: cc
  33. CFLAGS: -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2
  34. MAIN_LDLIBS: -lpthread -lm -ldl
  35.  
  36. rm -f pcsx_rearmed_libretro.so libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o libpcsxcore/decode_xa.o libpcsxcore/mdec.o libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o libpcsxcore/sio.o libpcsxcore/spu.o libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o deps/libchdr/deps/zlib-1.2.11/adler32.o deps/libchdr/deps/zlib-1.2.11/compress.o deps/libchdr/deps/zlib-1.2.11/crc32.o deps/libchdr/deps/zlib-1.2.11/deflate.o deps/libchdr/deps/zlib-1.2.11/gzclose.o deps/libchdr/deps/zlib-1.2.11/gzlib.o deps/libchdr/deps/zlib-1.2.11/gzread.o deps/libchdr/deps/zlib-1.2.11/gzwrite.o deps/libchdr/deps/zlib-1.2.11/infback.o deps/libchdr/deps/zlib-1.2.11/inffast.o deps/libchdr/deps/zlib-1.2.11/inflate.o deps/libchdr/deps/zlib-1.2.11/inftrees.o deps/libchdr/deps/zlib-1.2.11/trees.o deps/libchdr/deps/zlib-1.2.11/uncompr.o deps/libchdr/deps/zlib-1.2.11/zutil.o libpcsxcore/lightrec/mem.o deps/lightrec/tlsf/tlsf.o libpcsxcore/lightrec/plugin.o deps/lightning/lib/jit_disasm.o deps/lightning/lib/jit_memory.o deps/lightning/lib/jit_names.o deps/lightning/lib/jit_note.o deps/lightning/lib/jit_print.o deps/lightning/lib/jit_size.o deps/lightning/lib/lightning.o deps/lightrec/blockcache.o deps/lightrec/disassembler.o deps/lightrec/emitter.o deps/lightrec/interpreter.o deps/lightrec/lightrec.o deps/lightrec/memmanager.o deps/lightrec/optimizer.o deps/lightrec/regcache.o libpcsxcore/new_dynarec/emu_if.o plugins/dfsound/dma.o plugins/dfsound/freeze.o plugins/dfsound/registers.o plugins/dfsound/spu.o plugins/dfsound/out.o plugins/dfsound/nullsnd.o plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o plugins/gpu_neon/psx_gpu_if.o plugins/gpu_neon/psx_gpu/psx_gpu_simd.o plugins/cdrcimg/cdrcimg.o deps/libchdr/deps/lzma-19.00/src/Alloc.o deps/libchdr/deps/lzma-19.00/src/Bra86.o deps/libchdr/deps/lzma-19.00/src/BraIA64.o deps/libchdr/deps/lzma-19.00/src/CpuArch.o deps/libchdr/deps/lzma-19.00/src/Delta.o deps/libchdr/deps/lzma-19.00/src/LzFind.o deps/libchdr/deps/lzma-19.00/src/Lzma86Dec.o deps/libchdr/deps/lzma-19.00/src/LzmaDec.o deps/libchdr/deps/lzma-19.00/src/LzmaEnc.o deps/libchdr/deps/lzma-19.00/src/Sort.o deps/libchdr/src/libchdr_bitstream.o deps/libchdr/src/libchdr_cdrom.o deps/libchdr/src/libchdr_chd.o deps/libchdr/src/libchdr_flac.o deps/libchdr/src/libchdr_huffman.o frontend/cspace.o frontend/libretro.o frontend/main.o frontend/plugin.o pcsx_rearmed_libretro.so.map frontend/revision.h
  37. TARGET: pcsx_rearmed_libretro.so
  38. platform: unix
  39. ARCH: i686
  40. DYNAREC: lightrec
  41. BUILTIN_GPU: neon
  42. CC: cc
  43. CFLAGS: -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2
  44. MAIN_LDLIBS: -lpthread -lm -ldl
  45.  
  46. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/cdriso.o libpcsxcore/cdriso.c
  47. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/cdrom.o libpcsxcore/cdrom.c
  48. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/cheat.o libpcsxcore/cheat.c
  49. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/database.o libpcsxcore/database.c
  50. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/decode_xa.o libpcsxcore/decode_xa.c
  51. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/mdec.o libpcsxcore/mdec.c
  52. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/misc.o libpcsxcore/misc.c
  53. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/plugins.o libpcsxcore/plugins.c
  54. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/ppf.o libpcsxcore/ppf.c
  55. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-nonnull -c -o libpcsxcore/psxbios.o libpcsxcore/psxbios.c
  56. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxcommon.o libpcsxcore/psxcommon.c
  57. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxcounters.o libpcsxcore/psxcounters.c
  58. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxdma.o libpcsxcore/psxdma.c
  59. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxhle.o libpcsxcore/psxhle.c
  60. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxhw.o libpcsxcore/psxhw.c
  61. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxinterpreter.o libpcsxcore/psxinterpreter.c
  62. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/psxmem.o libpcsxcore/psxmem.c
  63. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/r3000a.o libpcsxcore/r3000a.c
  64. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/sio.o libpcsxcore/sio.c
  65. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/spu.o libpcsxcore/spu.c
  66. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/gte.o libpcsxcore/gte.c
  67. cc -c -o libpcsxcore/gte_nf.o libpcsxcore/gte.c -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -DFLAGLESS
  68. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/gte_divider.o libpcsxcore/gte_divider.c
  69. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/adler32.o deps/libchdr/deps/zlib-1.2.11/adler32.c
  70. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/compress.o deps/libchdr/deps/zlib-1.2.11/compress.c
  71. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/crc32.o deps/libchdr/deps/zlib-1.2.11/crc32.c
  72. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/deflate.o deps/libchdr/deps/zlib-1.2.11/deflate.c
  73. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/gzclose.o deps/libchdr/deps/zlib-1.2.11/gzclose.c
  74. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/gzlib.o deps/libchdr/deps/zlib-1.2.11/gzlib.c
  75. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/gzread.o deps/libchdr/deps/zlib-1.2.11/gzread.c
  76. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/gzwrite.o deps/libchdr/deps/zlib-1.2.11/gzwrite.c
  77. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/infback.o deps/libchdr/deps/zlib-1.2.11/infback.c
  78. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/inffast.o deps/libchdr/deps/zlib-1.2.11/inffast.c
  79. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/inflate.o deps/libchdr/deps/zlib-1.2.11/inflate.c
  80. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/inftrees.o deps/libchdr/deps/zlib-1.2.11/inftrees.c
  81. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/trees.o deps/libchdr/deps/zlib-1.2.11/trees.c
  82. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/uncompr.o deps/libchdr/deps/zlib-1.2.11/uncompr.c
  83. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/libchdr/deps/zlib-1.2.11/zutil.o deps/libchdr/deps/zlib-1.2.11/zutil.c
  84. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -D_GNU_SOURCE -c -o libpcsxcore/lightrec/mem.o libpcsxcore/lightrec/mem.c
  85. libpcsxcore/lightrec/mem.c:6:0: warning: "_GNU_SOURCE" redefined
  86. #define _GNU_SOURCE
  87.  
  88. <command-line>:0:0: note: this is the location of the previous definition
  89. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -c -o deps/lightrec/tlsf/tlsf.o deps/lightrec/tlsf/tlsf.c
  90. libpcsxcore/lightrec/mem.c: In function ‘mmap_huge’:
  91. libpcsxcore/lightrec/mem.c:53:40: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
  92. printf("Hugetlb mmap to address 0x%lx succeeded\n", (uintptr_t) addr);
  93. ~~^ ~~~~~~~~~~~~~~~~
  94. %x
  95. libpcsxcore/lightrec/mem.c:59:40: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
  96. printf("Regular mmap to address 0x%lx succeeded\n", (uintptr_t) addr);
  97. ~~^ ~~~~~~~~~~~~~~~~
  98. %x
  99. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c -o libpcsxcore/lightrec/plugin.o libpcsxcore/lightrec/plugin.c
  100. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -DHAVE_MMAP -c -o deps/lightning/lib/jit_disasm.o deps/lightning/lib/jit_disasm.c
  101. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -DHAVE_MMAP -c -o deps/lightning/lib/jit_memory.o deps/lightning/lib/jit_memory.c
  102. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -DHAVE_MMAP -c -o deps/lightning/lib/jit_names.o deps/lightning/lib/jit_names.c
  103. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -DHAVE_MMAP -c -o deps/lightning/lib/jit_note.o deps/lightning/lib/jit_note.c
  104. cc -march=native -O2 -DGIT_VERSION=\"" aced3eb"\" -fPIC -D_FILE_OFFSET_BITS=64 -msse2 -Wall -Iinclude -ffast-math -O2 -DNDEBUG -Ideps/libchdr/deps/zlib-1.2.11 -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec -DLIGHTREC -DLIGHTREC_STATIC -DLIGHTREC_CUSTOM_MAP=1 -DLIGHTREC_ENABLE_THREADED_COMPILER=0 -DGPU_NEON -Ideps/libchdr/include -Ideps/libchdr/include/libchdr -Ideps/libchdr/deps/lzma-19.00/include -DHAVE_CHD -D_7ZIP_ST -Ilibretro-common/include -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -Wno-unused -Wno-unused-function -DHAVE_MMAP -c -o deps/lightning/lib/jit_print.o deps/lightning/lib/jit_print.c
  105. deps/lightning/lib/jit_print.c: In function ‘_jit_print_node’:
  106. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  107. #define print_dec(value) fprintf(print_stream, "%ld", value)
  108. ^
  109. deps/lightning/lib/jit_print.c:102:12:
  110. print_dec(node->v.w);
  111. ~~~~~~~~~
  112. deps/lightning/lib/jit_print.c:102:2: note: in expansion of macro ‘print_dec’
  113. print_dec(node->v.w);
  114. ^~~~~~~~~
  115. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  116. fprintf(print_stream, "-0x%lx", -value); \
  117. ^ ~~~~~~~~~~~~
  118. else \
  119. ~~~~~~~~~~~~~
  120. fprintf(print_stream, "0x%lx", value); \
  121. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  122. } while (0)
  123. ~~~~~~~~~~~
  124. #define print_dec(value) fprintf(print_stream, "%ld", value)
  125. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126. #define print_flt(value) fprintf(print_stream, "%g", value)
  127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128. #define print_str(value) fprintf(print_stream, "%s", value)
  129. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  130. #define print_ptr(value) fprintf(print_stream, "%p", value)
  131. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  132. #define print_reg(value) \
  133. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  134. do { \
  135. ~~~~~~~~~~~~~
  136. if ((value) & jit_regno_patch) \
  137. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  138. print_chr('?'); \
  139. ~~~~~~~~~~~~~~~~~~~~~~
  140. print_str(_rvs[jit_regno(value)].name); \
  141. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  142. } while (0)
  143. ~~~~~~~~~~~
  144. #define print_arg(value) \
  145. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  146. do { \
  147. ~~~~~~~~~~~~~
  148. print_chr('#'); \
  149. ~~~~~~~~~~~~~~~~~~~~~~~
  150. if (value) \
  151. ~~~~~~~~~~~~~~~~~~
  152. print_dec((value)->v.w); \
  153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154. else \
  155. ~~~~~~~~~~~~~
  156. print_chr('?'); \
  157. ~~~~~~~~~~~~~~~~~~~~~~
  158. } while (0)
  159. ~~~~~~~~~~~
  160.  
  161.  
  162. /*
  163. ~~
  164. * Initialization
  165. ~~~~~~~~~~~~~~~~
  166. */
  167. ~~
  168. #include "jit_names.c"
  169. ~~~~~~~~~~~~~~~~~~~~~~
  170. /*
  171. ~~
  172. * Initialization
  173. ~~~~~~~~~~~~~~~~
  174. */
  175. ~~
  176. static FILE *print_stream;
  177. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  178.  
  179.  
  180.  
  181.  
  182. /*
  183. ~~
  184. * Implementation
  185. ~~~~~~~~~~~~~~~~
  186. */
  187. ~~
  188. void
  189. ~~~~
  190. jit_init_print(void)
  191. ~~~~~~~~~~~~~~~~~~~~
  192. {
  193. ~
  194. if (!print_stream)
  195. ~~~~~~~~~~~~~~~~~~
  196. print_stream = stdout;
  197. ~~~~~~~~~~~~~~~~~~~~~~
  198. }
  199. ~
  200.  
  201.  
  202. void
  203. ~~~~
  204. _jit_print(jit_state_t *_jit)
  205. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  206. {
  207. ~
  208. jit_node_t *node;
  209. ~~~~~~~~~~~~~~~~~~
  210.  
  211.  
  212. if ((node = _jitc->head)) {
  213. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  214. jit_print_node(node);
  215. ~~~~~~~~~~~~~~~~~~~~~
  216. for (node = node->next; node; node = node->next) {
  217. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  218. print_chr('\n');
  219. ~~~~~~~~~~~~~~~~
  220. jit_print_node(node);
  221. ~~~~~~~~~~~~~~~~~~~~~
  222. }
  223. ~
  224. print_chr('\n');
  225. ~~~~~~~~~~~~~~~~
  226. }
  227. ~
  228. }
  229. ~
  230.  
  231.  
  232. void
  233. ~~~~
  234. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  235. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  236. {
  237. ~
  238. jit_block_t *block;
  239. ~~~~~~~~~~~~~~~~~~~~
  240. jit_int32_t value;
  241. ~~~~~~~~~~~~~~~~~~~~
  242. jit_int32_t offset;
  243. ~~~~~~~~~~~~~~~~~~~~~
  244.  
  245.  
  246. if (node->code == jit_code_label ||
  247. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  248. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  249. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  250. print_chr('L');
  251. ~~~~~~~~~~~~~~~
  252. print_dec(node->v.w);
  253. ~~~~~~~~~~~~~~~~~~~~~
  254. print_chr(':');
  255. ~~~~~~~~~~~~~~~
  256. block = _jitc->blocks.ptr + node->v.w;
  257. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  258. for (offset = 0; offset < _jitc->reglen; offset++) {
  259. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  260. if (jit_regset_tstbit(&block->reglive, offset)) {
  261. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  262. print_chr(' ');
  263. ~~~~~~~~~~~~~~~
  264. print_reg(offset);
  265. ~~~~~~~~~~~~~~~~~~
  266. }
  267. ~
  268. }
  269. ~
  270. if (node->code == jit_code_prolog ||
  271. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  272. node->code == jit_code_epilog) {
  273. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  274. print_str(" /* ");
  275. ~~~~~~~~~~~~~~~~~~
  276. print_str(code_name[node->code]);
  277. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  278. print_str(" */");
  279. ~~~~~~~~~~~~~~~~~
  280. }
  281. ~
  282. return;
  283. ~~~~~~~
  284. }
  285. ~
  286. value = jit_classify(node->code) &
  287. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  288. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  289. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  290. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  291. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  292. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  293. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  294. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  295. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  296. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  297. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  298. node->code == jit_code_finishr ||
  299. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  300. node->code == jit_code_finishi))
  301. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  302. print_str(" ");
  303. ~~~~~~~~~~~~~~~~~~
  304. else
  305. ~~~~
  306. print_chr('\t');
  307. ~~~~~~~~~~~~~~~~
  308. if (node->flag & jit_flag_synth)
  309. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  310. print_str(" \\__ ");
  311. ~~~~~~~~~~~~~~~~~~~~
  312. print_str(code_name[node->code]);
  313. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  314. switch (node->code) {
  315. ~~~~~~~~~~~~~~~~~~~~~
  316. r:
  317. ~~
  318. print_chr(' '); print_reg(node->u.w); return;
  319. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  320. w:
  321. ~~
  322. print_chr(' '); print_hex(node->u.w); return;
  323. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  324. deps/lightning/lib/jit_print.c:137:22: note: in expansion of macro ‘print_hex’
  325. print_chr(' '); print_hex(node->u.w); return;
  326. ^~~~~~~~~
  327. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  328. fprintf(print_stream, "0x%lx", value); \
  329. ^
  330. deps/lightning/lib/jit_print.c:137:32:
  331. print_chr(' '); print_hex(node->u.w); return;
  332. ~~~~~~~~~
  333. deps/lightning/lib/jit_print.c:137:22: note: in expansion of macro ‘print_hex’
  334. print_chr(' '); print_hex(node->u.w); return;
  335. ^~~~~~~~~
  336. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  337. #define print_dec(value) fprintf(print_stream, "%ld", value)
  338. ^
  339. deps/lightning/lib/jit_print.c:158:13:
  340. print_dec(node->u.n->v.w);
  341. ~~~~~~~~~~~~~~
  342. deps/lightning/lib/jit_print.c:158:3: note: in expansion of macro ‘print_dec’
  343. print_dec(node->u.n->v.w);
  344. ^~~~~~~~~
  345. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  346. #define print_dec(value) fprintf(print_stream, "%ld", value)
  347. ^
  348. deps/lightning/lib/jit_print.c:52:6: note: in expansion of macro ‘print_dec’
  349. print_dec((value)->v.w); \
  350. ^~~~~~~~~
  351. deps/lightning/lib/jit_print.c:162:22: note: in expansion of macro ‘print_arg’
  352. print_chr(' '); print_arg(node); return;
  353. ^~~~~~~~~
  354. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  355. fprintf(print_stream, "-0x%lx", -value); \
  356. ^ ~~~~~~~~~~~~
  357. else \
  358. ~~~~~~~~~~~~~
  359. fprintf(print_stream, "0x%lx", value); \
  360. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  361. } while (0)
  362. ~~~~~~~~~~~
  363. #define print_dec(value) fprintf(print_stream, "%ld", value)
  364. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  365. #define print_flt(value) fprintf(print_stream, "%g", value)
  366. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  367. #define print_str(value) fprintf(print_stream, "%s", value)
  368. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  369. #define print_ptr(value) fprintf(print_stream, "%p", value)
  370. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  371. #define print_reg(value) \
  372. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  373. do { \
  374. ~~~~~~~~~~~~~
  375. if ((value) & jit_regno_patch) \
  376. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  377. print_chr('?'); \
  378. ~~~~~~~~~~~~~~~~~~~~~~
  379. print_str(_rvs[jit_regno(value)].name); \
  380. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  381. } while (0)
  382. ~~~~~~~~~~~
  383. #define print_arg(value) \
  384. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  385. do { \
  386. ~~~~~~~~~~~~~
  387. print_chr('#'); \
  388. ~~~~~~~~~~~~~~~~~~~~~~~
  389. if (value) \
  390. ~~~~~~~~~~~~~~~~~~
  391. print_dec((value)->v.w); \
  392. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  393. else \
  394. ~~~~~~~~~~~~~
  395. print_chr('?'); \
  396. ~~~~~~~~~~~~~~~~~~~~~~
  397. } while (0)
  398. ~~~~~~~~~~~
  399.  
  400.  
  401. /*
  402. ~~
  403. * Initialization
  404. ~~~~~~~~~~~~~~~~
  405. */
  406. ~~
  407. #include "jit_names.c"
  408. ~~~~~~~~~~~~~~~~~~~~~~
  409. /*
  410. ~~
  411. * Initialization
  412. ~~~~~~~~~~~~~~~~
  413. */
  414. ~~
  415. static FILE *print_stream;
  416. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  417.  
  418.  
  419.  
  420.  
  421. /*
  422. ~~
  423. * Implementation
  424. ~~~~~~~~~~~~~~~~
  425. */
  426. ~~
  427. void
  428. ~~~~
  429. jit_init_print(void)
  430. ~~~~~~~~~~~~~~~~~~~~
  431. {
  432. ~
  433. if (!print_stream)
  434. ~~~~~~~~~~~~~~~~~~
  435. print_stream = stdout;
  436. ~~~~~~~~~~~~~~~~~~~~~~
  437. }
  438. ~
  439.  
  440.  
  441. void
  442. ~~~~
  443. _jit_print(jit_state_t *_jit)
  444. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  445. {
  446. ~
  447. jit_node_t *node;
  448. ~~~~~~~~~~~~~~~~~~
  449.  
  450.  
  451. if ((node = _jitc->head)) {
  452. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  453. jit_print_node(node);
  454. ~~~~~~~~~~~~~~~~~~~~~
  455. for (node = node->next; node; node = node->next) {
  456. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  457. print_chr('\n');
  458. ~~~~~~~~~~~~~~~~
  459. jit_print_node(node);
  460. ~~~~~~~~~~~~~~~~~~~~~
  461. }
  462. ~
  463. print_chr('\n');
  464. ~~~~~~~~~~~~~~~~
  465. }
  466. ~
  467. }
  468. ~
  469.  
  470.  
  471. void
  472. ~~~~
  473. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  474. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  475. {
  476. ~
  477. jit_block_t *block;
  478. ~~~~~~~~~~~~~~~~~~~~
  479. jit_int32_t value;
  480. ~~~~~~~~~~~~~~~~~~~~
  481. jit_int32_t offset;
  482. ~~~~~~~~~~~~~~~~~~~~~
  483.  
  484.  
  485. if (node->code == jit_code_label ||
  486. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  487. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  488. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  489. print_chr('L');
  490. ~~~~~~~~~~~~~~~
  491. print_dec(node->v.w);
  492. ~~~~~~~~~~~~~~~~~~~~~
  493. print_chr(':');
  494. ~~~~~~~~~~~~~~~
  495. block = _jitc->blocks.ptr + node->v.w;
  496. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  497. for (offset = 0; offset < _jitc->reglen; offset++) {
  498. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  499. if (jit_regset_tstbit(&block->reglive, offset)) {
  500. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  501. print_chr(' ');
  502. ~~~~~~~~~~~~~~~
  503. print_reg(offset);
  504. ~~~~~~~~~~~~~~~~~~
  505. }
  506. ~
  507. }
  508. ~
  509. if (node->code == jit_code_prolog ||
  510. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  511. node->code == jit_code_epilog) {
  512. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  513. print_str(" /* ");
  514. ~~~~~~~~~~~~~~~~~~
  515. print_str(code_name[node->code]);
  516. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  517. print_str(" */");
  518. ~~~~~~~~~~~~~~~~~
  519. }
  520. ~
  521. return;
  522. ~~~~~~~
  523. }
  524. ~
  525. value = jit_classify(node->code) &
  526. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  527. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  528. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  529. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  530. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  531. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  532. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  533. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  534. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  535. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  536. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  537. node->code == jit_code_finishr ||
  538. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  539. node->code == jit_code_finishi))
  540. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  541. print_str(" ");
  542. ~~~~~~~~~~~~~~~~~~
  543. else
  544. ~~~~
  545. print_chr('\t');
  546. ~~~~~~~~~~~~~~~~
  547. if (node->flag & jit_flag_synth)
  548. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  549. print_str(" \\__ ");
  550. ~~~~~~~~~~~~~~~~~~~~
  551. print_str(code_name[node->code]);
  552. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  553. switch (node->code) {
  554. ~~~~~~~~~~~~~~~~~~~~~
  555. r:
  556. ~~
  557. print_chr(' '); print_reg(node->u.w); return;
  558. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  559. w:
  560. ~~
  561. print_chr(' '); print_hex(node->u.w); return;
  562. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  563. f:
  564. ~~
  565. print_chr(' ');
  566. ~~~~~~~~~~~~~~~
  567. if (node->flag & jit_flag_data)
  568. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  569. print_flt(*(jit_float32_t *)node->u.n->u.w);
  570. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  571. else
  572. ~~~~
  573. print_flt(node->u.f);
  574. ~~~~~~~~~~~~~~~~~~~~~
  575. return;
  576. ~~~~~~~
  577. d:
  578. ~~
  579. print_chr(' ');
  580. ~~~~~~~~~~~~~~~
  581. if (node->flag & jit_flag_data)
  582. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  583. print_flt(*(jit_float64_t *)node->u.n->u.w);
  584. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  585. else
  586. ~~~~
  587. print_flt(node->u.d);
  588. ~~~~~~~~~~~~~~~~~~~~~
  589. return;
  590. ~~~~~~~
  591. n:
  592. ~~
  593. print_chr(' ');
  594. ~~~~~~~~~~~~~~~
  595. if (!(node->flag & jit_flag_node))
  596. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  597. print_ptr(node->u.p);
  598. ~~~~~~~~~~~~~~~~~~~~~
  599. else {
  600. ~~~~~~
  601. print_chr('L');
  602. ~~~~~~~~~~~~~~~
  603. print_dec(node->u.n->v.w);
  604. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  605. }
  606. ~
  607. return;
  608. ~~~~~~~
  609. a:
  610. ~~
  611. print_chr(' '); print_arg(node); return;
  612. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  613. r_r:
  614. ~~~~
  615. print_chr(' '); print_reg(node->u.w);
  616. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  617. print_chr(' '); print_reg(node->v.w); return;
  618. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  619. r_w:
  620. ~~~~
  621. print_chr(' '); print_reg(node->u.w);
  622. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  623. print_chr(' '); print_hex(node->v.w); return;
  624. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  625. deps/lightning/lib/jit_print.c:168:22: note: in expansion of macro ‘print_hex’
  626. print_chr(' '); print_hex(node->v.w); return;
  627. ^~~~~~~~~
  628. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  629. fprintf(print_stream, "0x%lx", value); \
  630. ^
  631. deps/lightning/lib/jit_print.c:168:32:
  632. print_chr(' '); print_hex(node->v.w); return;
  633. ~~~~~~~~~
  634. deps/lightning/lib/jit_print.c:168:22: note: in expansion of macro ‘print_hex’
  635. print_chr(' '); print_hex(node->v.w); return;
  636. ^~~~~~~~~
  637. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  638. #define print_dec(value) fprintf(print_stream, "%ld", value)
  639. ^
  640. deps/lightning/lib/jit_print.c:52:6: note: in expansion of macro ‘print_dec’
  641. print_dec((value)->v.w); \
  642. ^~~~~~~~~
  643. deps/lightning/lib/jit_print.c:187:22: note: in expansion of macro ‘print_arg’
  644. print_chr(' '); print_arg(node->v.n);
  645. ^~~~~~~~~
  646. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  647. fprintf(print_stream, "-0x%lx", -value); \
  648. ^ ~~~~~~~~~~~~
  649. else \
  650. ~~~~~~~~~~~~~
  651. fprintf(print_stream, "0x%lx", value); \
  652. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  653. } while (0)
  654. ~~~~~~~~~~~
  655. #define print_dec(value) fprintf(print_stream, "%ld", value)
  656. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  657. #define print_flt(value) fprintf(print_stream, "%g", value)
  658. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  659. #define print_str(value) fprintf(print_stream, "%s", value)
  660. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  661. #define print_ptr(value) fprintf(print_stream, "%p", value)
  662. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  663. #define print_reg(value) \
  664. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  665. do { \
  666. ~~~~~~~~~~~~~
  667. if ((value) & jit_regno_patch) \
  668. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  669. print_chr('?'); \
  670. ~~~~~~~~~~~~~~~~~~~~~~
  671. print_str(_rvs[jit_regno(value)].name); \
  672. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  673. } while (0)
  674. ~~~~~~~~~~~
  675. #define print_arg(value) \
  676. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  677. do { \
  678. ~~~~~~~~~~~~~
  679. print_chr('#'); \
  680. ~~~~~~~~~~~~~~~~~~~~~~~
  681. if (value) \
  682. ~~~~~~~~~~~~~~~~~~
  683. print_dec((value)->v.w); \
  684. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  685. else \
  686. ~~~~~~~~~~~~~
  687. print_chr('?'); \
  688. ~~~~~~~~~~~~~~~~~~~~~~
  689. } while (0)
  690. ~~~~~~~~~~~
  691.  
  692.  
  693. /*
  694. ~~
  695. * Initialization
  696. ~~~~~~~~~~~~~~~~
  697. */
  698. ~~
  699. #include "jit_names.c"
  700. ~~~~~~~~~~~~~~~~~~~~~~
  701. /*
  702. ~~
  703. * Initialization
  704. ~~~~~~~~~~~~~~~~
  705. */
  706. ~~
  707. static FILE *print_stream;
  708. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  709.  
  710.  
  711.  
  712.  
  713. /*
  714. ~~
  715. * Implementation
  716. ~~~~~~~~~~~~~~~~
  717. */
  718. ~~
  719. void
  720. ~~~~
  721. jit_init_print(void)
  722. ~~~~~~~~~~~~~~~~~~~~
  723. {
  724. ~
  725. if (!print_stream)
  726. ~~~~~~~~~~~~~~~~~~
  727. print_stream = stdout;
  728. ~~~~~~~~~~~~~~~~~~~~~~
  729. }
  730. ~
  731.  
  732.  
  733. void
  734. ~~~~
  735. _jit_print(jit_state_t *_jit)
  736. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  737. {
  738. ~
  739. jit_node_t *node;
  740. ~~~~~~~~~~~~~~~~~~
  741.  
  742.  
  743. if ((node = _jitc->head)) {
  744. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  745. jit_print_node(node);
  746. ~~~~~~~~~~~~~~~~~~~~~
  747. for (node = node->next; node; node = node->next) {
  748. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  749. print_chr('\n');
  750. ~~~~~~~~~~~~~~~~
  751. jit_print_node(node);
  752. ~~~~~~~~~~~~~~~~~~~~~
  753. }
  754. ~
  755. print_chr('\n');
  756. ~~~~~~~~~~~~~~~~
  757. }
  758. ~
  759. }
  760. ~
  761.  
  762.  
  763. void
  764. ~~~~
  765. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  766. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  767. {
  768. ~
  769. jit_block_t *block;
  770. ~~~~~~~~~~~~~~~~~~~~
  771. jit_int32_t value;
  772. ~~~~~~~~~~~~~~~~~~~~
  773. jit_int32_t offset;
  774. ~~~~~~~~~~~~~~~~~~~~~
  775.  
  776.  
  777. if (node->code == jit_code_label ||
  778. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  779. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  780. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  781. print_chr('L');
  782. ~~~~~~~~~~~~~~~
  783. print_dec(node->v.w);
  784. ~~~~~~~~~~~~~~~~~~~~~
  785. print_chr(':');
  786. ~~~~~~~~~~~~~~~
  787. block = _jitc->blocks.ptr + node->v.w;
  788. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  789. for (offset = 0; offset < _jitc->reglen; offset++) {
  790. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  791. if (jit_regset_tstbit(&block->reglive, offset)) {
  792. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  793. print_chr(' ');
  794. ~~~~~~~~~~~~~~~
  795. print_reg(offset);
  796. ~~~~~~~~~~~~~~~~~~
  797. }
  798. ~
  799. }
  800. ~
  801. if (node->code == jit_code_prolog ||
  802. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  803. node->code == jit_code_epilog) {
  804. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  805. print_str(" /* ");
  806. ~~~~~~~~~~~~~~~~~~
  807. print_str(code_name[node->code]);
  808. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  809. print_str(" */");
  810. ~~~~~~~~~~~~~~~~~
  811. }
  812. ~
  813. return;
  814. ~~~~~~~
  815. }
  816. ~
  817. value = jit_classify(node->code) &
  818. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  819. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  820. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  821. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  822. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  823. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  824. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  825. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  826. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  827. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  828. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  829. node->code == jit_code_finishr ||
  830. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  831. node->code == jit_code_finishi))
  832. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  833. print_str(" ");
  834. ~~~~~~~~~~~~~~~~~~
  835. else
  836. ~~~~
  837. print_chr('\t');
  838. ~~~~~~~~~~~~~~~~
  839. if (node->flag & jit_flag_synth)
  840. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  841. print_str(" \\__ ");
  842. ~~~~~~~~~~~~~~~~~~~~
  843. print_str(code_name[node->code]);
  844. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  845. switch (node->code) {
  846. ~~~~~~~~~~~~~~~~~~~~~
  847. r:
  848. ~~
  849. print_chr(' '); print_reg(node->u.w); return;
  850. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  851. w:
  852. ~~
  853. print_chr(' '); print_hex(node->u.w); return;
  854. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  855. f:
  856. ~~
  857. print_chr(' ');
  858. ~~~~~~~~~~~~~~~
  859. if (node->flag & jit_flag_data)
  860. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  861. print_flt(*(jit_float32_t *)node->u.n->u.w);
  862. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  863. else
  864. ~~~~
  865. print_flt(node->u.f);
  866. ~~~~~~~~~~~~~~~~~~~~~
  867. return;
  868. ~~~~~~~
  869. d:
  870. ~~
  871. print_chr(' ');
  872. ~~~~~~~~~~~~~~~
  873. if (node->flag & jit_flag_data)
  874. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  875. print_flt(*(jit_float64_t *)node->u.n->u.w);
  876. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  877. else
  878. ~~~~
  879. print_flt(node->u.d);
  880. ~~~~~~~~~~~~~~~~~~~~~
  881. return;
  882. ~~~~~~~
  883. n:
  884. ~~
  885. print_chr(' ');
  886. ~~~~~~~~~~~~~~~
  887. if (!(node->flag & jit_flag_node))
  888. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  889. print_ptr(node->u.p);
  890. ~~~~~~~~~~~~~~~~~~~~~
  891. else {
  892. ~~~~~~
  893. print_chr('L');
  894. ~~~~~~~~~~~~~~~
  895. print_dec(node->u.n->v.w);
  896. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  897. }
  898. ~
  899. return;
  900. ~~~~~~~
  901. a:
  902. ~~
  903. print_chr(' '); print_arg(node); return;
  904. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  905. r_r:
  906. ~~~~
  907. print_chr(' '); print_reg(node->u.w);
  908. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  909. print_chr(' '); print_reg(node->v.w); return;
  910. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  911. r_w:
  912. ~~~~
  913. print_chr(' '); print_reg(node->u.w);
  914. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  915. print_chr(' '); print_hex(node->v.w); return;
  916. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  917. r_f:
  918. ~~~~
  919. print_chr(' '); print_reg(node->u.w);
  920. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  921. print_chr(' ');
  922. ~~~~~~~~~~~~~~~
  923. if (node->flag & jit_flag_data)
  924. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  925. print_flt(*(jit_float32_t *)node->v.n->u.w);
  926. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  927. else
  928. ~~~~
  929. print_flt(node->v.f);
  930. ~~~~~~~~~~~~~~~~~~~~~
  931. return;
  932. ~~~~~~~
  933. r_d:
  934. ~~~~
  935. print_chr(' '); print_reg(node->u.w);
  936. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  937. print_chr(' ');
  938. ~~~~~~~~~~~~~~~
  939. if (node->flag & jit_flag_data)
  940. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  941. print_flt(*(jit_float64_t *)node->v.n->u.w);
  942. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  943. else
  944. ~~~~
  945. print_flt(node->v.d);
  946. ~~~~~~~~~~~~~~~~~~~~~
  947. return;
  948. ~~~~~~~
  949. r_a:
  950. ~~~~
  951. print_chr(' '); print_reg(node->u.w);
  952. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  953. print_chr(' '); print_arg(node->v.n);
  954. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  955. return;
  956. ~~~~~~~
  957. w_r:
  958. ~~~~
  959. print_chr(' '); print_hex(node->u.w);
  960. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  961. deps/lightning/lib/jit_print.c:190:22: note: in expansion of macro ‘print_hex’
  962. print_chr(' '); print_hex(node->u.w);
  963. ^~~~~~~~~
  964. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  965. fprintf(print_stream, "0x%lx", value); \
  966. ^
  967. deps/lightning/lib/jit_print.c:190:32:
  968. print_chr(' '); print_hex(node->u.w);
  969. ~~~~~~~~~
  970. deps/lightning/lib/jit_print.c:190:22: note: in expansion of macro ‘print_hex’
  971. print_chr(' '); print_hex(node->u.w);
  972. ^~~~~~~~~
  973. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  974. fprintf(print_stream, "-0x%lx", -value); \
  975. ^ ~~~~~~~~~~~~
  976. else \
  977. ~~~~~~~~~~~~~
  978. fprintf(print_stream, "0x%lx", value); \
  979. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  980. } while (0)
  981. ~~~~~~~~~~~
  982. #define print_dec(value) fprintf(print_stream, "%ld", value)
  983. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  984. #define print_flt(value) fprintf(print_stream, "%g", value)
  985. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  986. #define print_str(value) fprintf(print_stream, "%s", value)
  987. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  988. #define print_ptr(value) fprintf(print_stream, "%p", value)
  989. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  990. #define print_reg(value) \
  991. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  992. do { \
  993. ~~~~~~~~~~~~~
  994. if ((value) & jit_regno_patch) \
  995. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  996. print_chr('?'); \
  997. ~~~~~~~~~~~~~~~~~~~~~~
  998. print_str(_rvs[jit_regno(value)].name); \
  999. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1000. } while (0)
  1001. ~~~~~~~~~~~
  1002. #define print_arg(value) \
  1003. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1004. do { \
  1005. ~~~~~~~~~~~~~
  1006. print_chr('#'); \
  1007. ~~~~~~~~~~~~~~~~~~~~~~~
  1008. if (value) \
  1009. ~~~~~~~~~~~~~~~~~~
  1010. print_dec((value)->v.w); \
  1011. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1012. else \
  1013. ~~~~~~~~~~~~~
  1014. print_chr('?'); \
  1015. ~~~~~~~~~~~~~~~~~~~~~~
  1016. } while (0)
  1017. ~~~~~~~~~~~
  1018.  
  1019.  
  1020. /*
  1021. ~~
  1022. * Initialization
  1023. ~~~~~~~~~~~~~~~~
  1024. */
  1025. ~~
  1026. #include "jit_names.c"
  1027. ~~~~~~~~~~~~~~~~~~~~~~
  1028. /*
  1029. ~~
  1030. * Initialization
  1031. ~~~~~~~~~~~~~~~~
  1032. */
  1033. ~~
  1034. static FILE *print_stream;
  1035. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1036.  
  1037.  
  1038.  
  1039.  
  1040. /*
  1041. ~~
  1042. * Implementation
  1043. ~~~~~~~~~~~~~~~~
  1044. */
  1045. ~~
  1046. void
  1047. ~~~~
  1048. jit_init_print(void)
  1049. ~~~~~~~~~~~~~~~~~~~~
  1050. {
  1051. ~
  1052. if (!print_stream)
  1053. ~~~~~~~~~~~~~~~~~~
  1054. print_stream = stdout;
  1055. ~~~~~~~~~~~~~~~~~~~~~~
  1056. }
  1057. ~
  1058.  
  1059.  
  1060. void
  1061. ~~~~
  1062. _jit_print(jit_state_t *_jit)
  1063. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1064. {
  1065. ~
  1066. jit_node_t *node;
  1067. ~~~~~~~~~~~~~~~~~~
  1068.  
  1069.  
  1070. if ((node = _jitc->head)) {
  1071. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1072. jit_print_node(node);
  1073. ~~~~~~~~~~~~~~~~~~~~~
  1074. for (node = node->next; node; node = node->next) {
  1075. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1076. print_chr('\n');
  1077. ~~~~~~~~~~~~~~~~
  1078. jit_print_node(node);
  1079. ~~~~~~~~~~~~~~~~~~~~~
  1080. }
  1081. ~
  1082. print_chr('\n');
  1083. ~~~~~~~~~~~~~~~~
  1084. }
  1085. ~
  1086. }
  1087. ~
  1088.  
  1089.  
  1090. void
  1091. ~~~~
  1092. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  1093. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1094. {
  1095. ~
  1096. jit_block_t *block;
  1097. ~~~~~~~~~~~~~~~~~~~~
  1098. jit_int32_t value;
  1099. ~~~~~~~~~~~~~~~~~~~~
  1100. jit_int32_t offset;
  1101. ~~~~~~~~~~~~~~~~~~~~~
  1102.  
  1103.  
  1104. if (node->code == jit_code_label ||
  1105. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1106. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  1107. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1108. print_chr('L');
  1109. ~~~~~~~~~~~~~~~
  1110. print_dec(node->v.w);
  1111. ~~~~~~~~~~~~~~~~~~~~~
  1112. print_chr(':');
  1113. ~~~~~~~~~~~~~~~
  1114. block = _jitc->blocks.ptr + node->v.w;
  1115. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1116. for (offset = 0; offset < _jitc->reglen; offset++) {
  1117. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1118. if (jit_regset_tstbit(&block->reglive, offset)) {
  1119. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1120. print_chr(' ');
  1121. ~~~~~~~~~~~~~~~
  1122. print_reg(offset);
  1123. ~~~~~~~~~~~~~~~~~~
  1124. }
  1125. ~
  1126. }
  1127. ~
  1128. if (node->code == jit_code_prolog ||
  1129. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1130. node->code == jit_code_epilog) {
  1131. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1132. print_str(" /* ");
  1133. ~~~~~~~~~~~~~~~~~~
  1134. print_str(code_name[node->code]);
  1135. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1136. print_str(" */");
  1137. ~~~~~~~~~~~~~~~~~
  1138. }
  1139. ~
  1140. return;
  1141. ~~~~~~~
  1142. }
  1143. ~
  1144. value = jit_classify(node->code) &
  1145. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1146. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  1147. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1148. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  1149. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1150. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  1151. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1152. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  1153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1154. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  1155. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1156. node->code == jit_code_finishr ||
  1157. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1158. node->code == jit_code_finishi))
  1159. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1160. print_str(" ");
  1161. ~~~~~~~~~~~~~~~~~~
  1162. else
  1163. ~~~~
  1164. print_chr('\t');
  1165. ~~~~~~~~~~~~~~~~
  1166. if (node->flag & jit_flag_synth)
  1167. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1168. print_str(" \\__ ");
  1169. ~~~~~~~~~~~~~~~~~~~~
  1170. print_str(code_name[node->code]);
  1171. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1172. switch (node->code) {
  1173. ~~~~~~~~~~~~~~~~~~~~~
  1174. r:
  1175. ~~
  1176. print_chr(' '); print_reg(node->u.w); return;
  1177. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1178. w:
  1179. ~~
  1180. print_chr(' '); print_hex(node->u.w); return;
  1181. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1182. f:
  1183. ~~
  1184. print_chr(' ');
  1185. ~~~~~~~~~~~~~~~
  1186. if (node->flag & jit_flag_data)
  1187. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1188. print_flt(*(jit_float32_t *)node->u.n->u.w);
  1189. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1190. else
  1191. ~~~~
  1192. print_flt(node->u.f);
  1193. ~~~~~~~~~~~~~~~~~~~~~
  1194. return;
  1195. ~~~~~~~
  1196. d:
  1197. ~~
  1198. print_chr(' ');
  1199. ~~~~~~~~~~~~~~~
  1200. if (node->flag & jit_flag_data)
  1201. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1202. print_flt(*(jit_float64_t *)node->u.n->u.w);
  1203. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1204. else
  1205. ~~~~
  1206. print_flt(node->u.d);
  1207. ~~~~~~~~~~~~~~~~~~~~~
  1208. return;
  1209. ~~~~~~~
  1210. n:
  1211. ~~
  1212. print_chr(' ');
  1213. ~~~~~~~~~~~~~~~
  1214. if (!(node->flag & jit_flag_node))
  1215. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1216. print_ptr(node->u.p);
  1217. ~~~~~~~~~~~~~~~~~~~~~
  1218. else {
  1219. ~~~~~~
  1220. print_chr('L');
  1221. ~~~~~~~~~~~~~~~
  1222. print_dec(node->u.n->v.w);
  1223. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1224. }
  1225. ~
  1226. return;
  1227. ~~~~~~~
  1228. a:
  1229. ~~
  1230. print_chr(' '); print_arg(node); return;
  1231. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1232. r_r:
  1233. ~~~~
  1234. print_chr(' '); print_reg(node->u.w);
  1235. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1236. print_chr(' '); print_reg(node->v.w); return;
  1237. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1238. r_w:
  1239. ~~~~
  1240. print_chr(' '); print_reg(node->u.w);
  1241. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1242. print_chr(' '); print_hex(node->v.w); return;
  1243. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1244. r_f:
  1245. ~~~~
  1246. print_chr(' '); print_reg(node->u.w);
  1247. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1248. print_chr(' ');
  1249. ~~~~~~~~~~~~~~~
  1250. if (node->flag & jit_flag_data)
  1251. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1252. print_flt(*(jit_float32_t *)node->v.n->u.w);
  1253. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1254. else
  1255. ~~~~
  1256. print_flt(node->v.f);
  1257. ~~~~~~~~~~~~~~~~~~~~~
  1258. return;
  1259. ~~~~~~~
  1260. r_d:
  1261. ~~~~
  1262. print_chr(' '); print_reg(node->u.w);
  1263. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1264. print_chr(' ');
  1265. ~~~~~~~~~~~~~~~
  1266. if (node->flag & jit_flag_data)
  1267. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1268. print_flt(*(jit_float64_t *)node->v.n->u.w);
  1269. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1270. else
  1271. ~~~~
  1272. print_flt(node->v.d);
  1273. ~~~~~~~~~~~~~~~~~~~~~
  1274. return;
  1275. ~~~~~~~
  1276. r_a:
  1277. ~~~~
  1278. print_chr(' '); print_reg(node->u.w);
  1279. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1280. print_chr(' '); print_arg(node->v.n);
  1281. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1282. return;
  1283. ~~~~~~~
  1284. w_r:
  1285. ~~~~
  1286. print_chr(' '); print_hex(node->u.w);
  1287. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1288. print_chr(' '); print_reg(node->v.w); return;
  1289. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1290. w_w:
  1291. ~~~~
  1292. print_chr(' '); print_hex(node->u.w);
  1293. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1294. deps/lightning/lib/jit_print.c:193:22: note: in expansion of macro ‘print_hex’
  1295. print_chr(' '); print_hex(node->u.w);
  1296. ^~~~~~~~~
  1297. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1298. fprintf(print_stream, "0x%lx", value); \
  1299. ^
  1300. deps/lightning/lib/jit_print.c:193:32:
  1301. print_chr(' '); print_hex(node->u.w);
  1302. ~~~~~~~~~
  1303. deps/lightning/lib/jit_print.c:193:22: note: in expansion of macro ‘print_hex’
  1304. print_chr(' '); print_hex(node->u.w);
  1305. ^~~~~~~~~
  1306. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1307. fprintf(print_stream, "-0x%lx", -value); \
  1308. ^ ~~~~~~~~~~~~
  1309. else \
  1310. ~~~~~~~~~~~~~
  1311. fprintf(print_stream, "0x%lx", value); \
  1312. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1313. } while (0)
  1314. ~~~~~~~~~~~
  1315. #define print_dec(value) fprintf(print_stream, "%ld", value)
  1316. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1317. #define print_flt(value) fprintf(print_stream, "%g", value)
  1318. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1319. #define print_str(value) fprintf(print_stream, "%s", value)
  1320. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1321. #define print_ptr(value) fprintf(print_stream, "%p", value)
  1322. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1323. #define print_reg(value) \
  1324. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1325. do { \
  1326. ~~~~~~~~~~~~~
  1327. if ((value) & jit_regno_patch) \
  1328. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1329. print_chr('?'); \
  1330. ~~~~~~~~~~~~~~~~~~~~~~
  1331. print_str(_rvs[jit_regno(value)].name); \
  1332. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1333. } while (0)
  1334. ~~~~~~~~~~~
  1335. #define print_arg(value) \
  1336. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1337. do { \
  1338. ~~~~~~~~~~~~~
  1339. print_chr('#'); \
  1340. ~~~~~~~~~~~~~~~~~~~~~~~
  1341. if (value) \
  1342. ~~~~~~~~~~~~~~~~~~
  1343. print_dec((value)->v.w); \
  1344. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1345. else \
  1346. ~~~~~~~~~~~~~
  1347. print_chr('?'); \
  1348. ~~~~~~~~~~~~~~~~~~~~~~
  1349. } while (0)
  1350. ~~~~~~~~~~~
  1351.  
  1352.  
  1353. /*
  1354. ~~
  1355. * Initialization
  1356. ~~~~~~~~~~~~~~~~
  1357. */
  1358. ~~
  1359. #include "jit_names.c"
  1360. ~~~~~~~~~~~~~~~~~~~~~~
  1361. /*
  1362. ~~
  1363. * Initialization
  1364. ~~~~~~~~~~~~~~~~
  1365. */
  1366. ~~
  1367. static FILE *print_stream;
  1368. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1369.  
  1370.  
  1371.  
  1372.  
  1373. /*
  1374. ~~
  1375. * Implementation
  1376. ~~~~~~~~~~~~~~~~
  1377. */
  1378. ~~
  1379. void
  1380. ~~~~
  1381. jit_init_print(void)
  1382. ~~~~~~~~~~~~~~~~~~~~
  1383. {
  1384. ~
  1385. if (!print_stream)
  1386. ~~~~~~~~~~~~~~~~~~
  1387. print_stream = stdout;
  1388. ~~~~~~~~~~~~~~~~~~~~~~
  1389. }
  1390. ~
  1391.  
  1392.  
  1393. void
  1394. ~~~~
  1395. _jit_print(jit_state_t *_jit)
  1396. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1397. {
  1398. ~
  1399. jit_node_t *node;
  1400. ~~~~~~~~~~~~~~~~~~
  1401.  
  1402.  
  1403. if ((node = _jitc->head)) {
  1404. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1405. jit_print_node(node);
  1406. ~~~~~~~~~~~~~~~~~~~~~
  1407. for (node = node->next; node; node = node->next) {
  1408. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1409. print_chr('\n');
  1410. ~~~~~~~~~~~~~~~~
  1411. jit_print_node(node);
  1412. ~~~~~~~~~~~~~~~~~~~~~
  1413. }
  1414. ~
  1415. print_chr('\n');
  1416. ~~~~~~~~~~~~~~~~
  1417. }
  1418. ~
  1419. }
  1420. ~
  1421.  
  1422.  
  1423. void
  1424. ~~~~
  1425. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  1426. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1427. {
  1428. ~
  1429. jit_block_t *block;
  1430. ~~~~~~~~~~~~~~~~~~~~
  1431. jit_int32_t value;
  1432. ~~~~~~~~~~~~~~~~~~~~
  1433. jit_int32_t offset;
  1434. ~~~~~~~~~~~~~~~~~~~~~
  1435.  
  1436.  
  1437. if (node->code == jit_code_label ||
  1438. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1439. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  1440. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1441. print_chr('L');
  1442. ~~~~~~~~~~~~~~~
  1443. print_dec(node->v.w);
  1444. ~~~~~~~~~~~~~~~~~~~~~
  1445. print_chr(':');
  1446. ~~~~~~~~~~~~~~~
  1447. block = _jitc->blocks.ptr + node->v.w;
  1448. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1449. for (offset = 0; offset < _jitc->reglen; offset++) {
  1450. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1451. if (jit_regset_tstbit(&block->reglive, offset)) {
  1452. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1453. print_chr(' ');
  1454. ~~~~~~~~~~~~~~~
  1455. print_reg(offset);
  1456. ~~~~~~~~~~~~~~~~~~
  1457. }
  1458. ~
  1459. }
  1460. ~
  1461. if (node->code == jit_code_prolog ||
  1462. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1463. node->code == jit_code_epilog) {
  1464. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1465. print_str(" /* ");
  1466. ~~~~~~~~~~~~~~~~~~
  1467. print_str(code_name[node->code]);
  1468. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1469. print_str(" */");
  1470. ~~~~~~~~~~~~~~~~~
  1471. }
  1472. ~
  1473. return;
  1474. ~~~~~~~
  1475. }
  1476. ~
  1477. value = jit_classify(node->code) &
  1478. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1479. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  1480. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1481. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  1482. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1483. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  1484. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1485. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  1486. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1487. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  1488. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1489. node->code == jit_code_finishr ||
  1490. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1491. node->code == jit_code_finishi))
  1492. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1493. print_str(" ");
  1494. ~~~~~~~~~~~~~~~~~~
  1495. else
  1496. ~~~~
  1497. print_chr('\t');
  1498. ~~~~~~~~~~~~~~~~
  1499. if (node->flag & jit_flag_synth)
  1500. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1501. print_str(" \\__ ");
  1502. ~~~~~~~~~~~~~~~~~~~~
  1503. print_str(code_name[node->code]);
  1504. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1505. switch (node->code) {
  1506. ~~~~~~~~~~~~~~~~~~~~~
  1507. r:
  1508. ~~
  1509. print_chr(' '); print_reg(node->u.w); return;
  1510. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1511. w:
  1512. ~~
  1513. print_chr(' '); print_hex(node->u.w); return;
  1514. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1515. f:
  1516. ~~
  1517. print_chr(' ');
  1518. ~~~~~~~~~~~~~~~
  1519. if (node->flag & jit_flag_data)
  1520. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1521. print_flt(*(jit_float32_t *)node->u.n->u.w);
  1522. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1523. else
  1524. ~~~~
  1525. print_flt(node->u.f);
  1526. ~~~~~~~~~~~~~~~~~~~~~
  1527. return;
  1528. ~~~~~~~
  1529. d:
  1530. ~~
  1531. print_chr(' ');
  1532. ~~~~~~~~~~~~~~~
  1533. if (node->flag & jit_flag_data)
  1534. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1535. print_flt(*(jit_float64_t *)node->u.n->u.w);
  1536. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1537. else
  1538. ~~~~
  1539. print_flt(node->u.d);
  1540. ~~~~~~~~~~~~~~~~~~~~~
  1541. return;
  1542. ~~~~~~~
  1543. n:
  1544. ~~
  1545. print_chr(' ');
  1546. ~~~~~~~~~~~~~~~
  1547. if (!(node->flag & jit_flag_node))
  1548. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1549. print_ptr(node->u.p);
  1550. ~~~~~~~~~~~~~~~~~~~~~
  1551. else {
  1552. ~~~~~~
  1553. print_chr('L');
  1554. ~~~~~~~~~~~~~~~
  1555. print_dec(node->u.n->v.w);
  1556. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1557. }
  1558. ~
  1559. return;
  1560. ~~~~~~~
  1561. a:
  1562. ~~
  1563. print_chr(' '); print_arg(node); return;
  1564. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1565. r_r:
  1566. ~~~~
  1567. print_chr(' '); print_reg(node->u.w);
  1568. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1569. print_chr(' '); print_reg(node->v.w); return;
  1570. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1571. r_w:
  1572. ~~~~
  1573. print_chr(' '); print_reg(node->u.w);
  1574. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1575. print_chr(' '); print_hex(node->v.w); return;
  1576. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1577. r_f:
  1578. ~~~~
  1579. print_chr(' '); print_reg(node->u.w);
  1580. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1581. print_chr(' ');
  1582. ~~~~~~~~~~~~~~~
  1583. if (node->flag & jit_flag_data)
  1584. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1585. print_flt(*(jit_float32_t *)node->v.n->u.w);
  1586. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1587. else
  1588. ~~~~
  1589. print_flt(node->v.f);
  1590. ~~~~~~~~~~~~~~~~~~~~~
  1591. return;
  1592. ~~~~~~~
  1593. r_d:
  1594. ~~~~
  1595. print_chr(' '); print_reg(node->u.w);
  1596. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1597. print_chr(' ');
  1598. ~~~~~~~~~~~~~~~
  1599. if (node->flag & jit_flag_data)
  1600. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1601. print_flt(*(jit_float64_t *)node->v.n->u.w);
  1602. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1603. else
  1604. ~~~~
  1605. print_flt(node->v.d);
  1606. ~~~~~~~~~~~~~~~~~~~~~
  1607. return;
  1608. ~~~~~~~
  1609. r_a:
  1610. ~~~~
  1611. print_chr(' '); print_reg(node->u.w);
  1612. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1613. print_chr(' '); print_arg(node->v.n);
  1614. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1615. return;
  1616. ~~~~~~~
  1617. w_r:
  1618. ~~~~
  1619. print_chr(' '); print_hex(node->u.w);
  1620. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1621. print_chr(' '); print_reg(node->v.w); return;
  1622. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1623. w_w:
  1624. ~~~~
  1625. print_chr(' '); print_hex(node->u.w);
  1626. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1627. print_chr(' '); print_hex(node->v.w); return;
  1628. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1629. deps/lightning/lib/jit_print.c:194:22: note: in expansion of macro ‘print_hex’
  1630. print_chr(' '); print_hex(node->v.w); return;
  1631. ^~~~~~~~~
  1632. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1633. fprintf(print_stream, "0x%lx", value); \
  1634. ^
  1635. deps/lightning/lib/jit_print.c:194:32:
  1636. print_chr(' '); print_hex(node->v.w); return;
  1637. ~~~~~~~~~
  1638. deps/lightning/lib/jit_print.c:194:22: note: in expansion of macro ‘print_hex’
  1639. print_chr(' '); print_hex(node->v.w); return;
  1640. ^~~~~~~~~
  1641. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1642. fprintf(print_stream, "-0x%lx", -value); \
  1643. ^ ~~~~~~~~~~~~
  1644. else \
  1645. ~~~~~~~~~~~~~
  1646. fprintf(print_stream, "0x%lx", value); \
  1647. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1648. } while (0)
  1649. ~~~~~~~~~~~
  1650. #define print_dec(value) fprintf(print_stream, "%ld", value)
  1651. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1652. #define print_flt(value) fprintf(print_stream, "%g", value)
  1653. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1654. #define print_str(value) fprintf(print_stream, "%s", value)
  1655. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1656. #define print_ptr(value) fprintf(print_stream, "%p", value)
  1657. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1658. #define print_reg(value) \
  1659. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1660. do { \
  1661. ~~~~~~~~~~~~~
  1662. if ((value) & jit_regno_patch) \
  1663. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1664. print_chr('?'); \
  1665. ~~~~~~~~~~~~~~~~~~~~~~
  1666. print_str(_rvs[jit_regno(value)].name); \
  1667. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1668. } while (0)
  1669. ~~~~~~~~~~~
  1670. #define print_arg(value) \
  1671. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1672. do { \
  1673. ~~~~~~~~~~~~~
  1674. print_chr('#'); \
  1675. ~~~~~~~~~~~~~~~~~~~~~~~
  1676. if (value) \
  1677. ~~~~~~~~~~~~~~~~~~
  1678. print_dec((value)->v.w); \
  1679. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1680. else \
  1681. ~~~~~~~~~~~~~
  1682. print_chr('?'); \
  1683. ~~~~~~~~~~~~~~~~~~~~~~
  1684. } while (0)
  1685. ~~~~~~~~~~~
  1686.  
  1687.  
  1688. /*
  1689. ~~
  1690. * Initialization
  1691. ~~~~~~~~~~~~~~~~
  1692. */
  1693. ~~
  1694. #include "jit_names.c"
  1695. ~~~~~~~~~~~~~~~~~~~~~~
  1696. /*
  1697. ~~
  1698. * Initialization
  1699. ~~~~~~~~~~~~~~~~
  1700. */
  1701. ~~
  1702. static FILE *print_stream;
  1703. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1704.  
  1705.  
  1706.  
  1707.  
  1708. /*
  1709. ~~
  1710. * Implementation
  1711. ~~~~~~~~~~~~~~~~
  1712. */
  1713. ~~
  1714. void
  1715. ~~~~
  1716. jit_init_print(void)
  1717. ~~~~~~~~~~~~~~~~~~~~
  1718. {
  1719. ~
  1720. if (!print_stream)
  1721. ~~~~~~~~~~~~~~~~~~
  1722. print_stream = stdout;
  1723. ~~~~~~~~~~~~~~~~~~~~~~
  1724. }
  1725. ~
  1726.  
  1727.  
  1728. void
  1729. ~~~~
  1730. _jit_print(jit_state_t *_jit)
  1731. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1732. {
  1733. ~
  1734. jit_node_t *node;
  1735. ~~~~~~~~~~~~~~~~~~
  1736.  
  1737.  
  1738. if ((node = _jitc->head)) {
  1739. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1740. jit_print_node(node);
  1741. ~~~~~~~~~~~~~~~~~~~~~
  1742. for (node = node->next; node; node = node->next) {
  1743. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1744. print_chr('\n');
  1745. ~~~~~~~~~~~~~~~~
  1746. jit_print_node(node);
  1747. ~~~~~~~~~~~~~~~~~~~~~
  1748. }
  1749. ~
  1750. print_chr('\n');
  1751. ~~~~~~~~~~~~~~~~
  1752. }
  1753. ~
  1754. }
  1755. ~
  1756.  
  1757.  
  1758. void
  1759. ~~~~
  1760. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  1761. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1762. {
  1763. ~
  1764. jit_block_t *block;
  1765. ~~~~~~~~~~~~~~~~~~~~
  1766. jit_int32_t value;
  1767. ~~~~~~~~~~~~~~~~~~~~
  1768. jit_int32_t offset;
  1769. ~~~~~~~~~~~~~~~~~~~~~
  1770.  
  1771.  
  1772. if (node->code == jit_code_label ||
  1773. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1774. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  1775. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1776. print_chr('L');
  1777. ~~~~~~~~~~~~~~~
  1778. print_dec(node->v.w);
  1779. ~~~~~~~~~~~~~~~~~~~~~
  1780. print_chr(':');
  1781. ~~~~~~~~~~~~~~~
  1782. block = _jitc->blocks.ptr + node->v.w;
  1783. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1784. for (offset = 0; offset < _jitc->reglen; offset++) {
  1785. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1786. if (jit_regset_tstbit(&block->reglive, offset)) {
  1787. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1788. print_chr(' ');
  1789. ~~~~~~~~~~~~~~~
  1790. print_reg(offset);
  1791. ~~~~~~~~~~~~~~~~~~
  1792. }
  1793. ~
  1794. }
  1795. ~
  1796. if (node->code == jit_code_prolog ||
  1797. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1798. node->code == jit_code_epilog) {
  1799. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1800. print_str(" /* ");
  1801. ~~~~~~~~~~~~~~~~~~
  1802. print_str(code_name[node->code]);
  1803. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1804. print_str(" */");
  1805. ~~~~~~~~~~~~~~~~~
  1806. }
  1807. ~
  1808. return;
  1809. ~~~~~~~
  1810. }
  1811. ~
  1812. value = jit_classify(node->code) &
  1813. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1814. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  1815. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1816. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  1817. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1818. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  1819. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1820. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  1821. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1822. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  1823. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1824. node->code == jit_code_finishr ||
  1825. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1826. node->code == jit_code_finishi))
  1827. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1828. print_str(" ");
  1829. ~~~~~~~~~~~~~~~~~~
  1830. else
  1831. ~~~~
  1832. print_chr('\t');
  1833. ~~~~~~~~~~~~~~~~
  1834. if (node->flag & jit_flag_synth)
  1835. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1836. print_str(" \\__ ");
  1837. ~~~~~~~~~~~~~~~~~~~~
  1838. print_str(code_name[node->code]);
  1839. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1840. switch (node->code) {
  1841. ~~~~~~~~~~~~~~~~~~~~~
  1842. r:
  1843. ~~
  1844. print_chr(' '); print_reg(node->u.w); return;
  1845. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1846. w:
  1847. ~~
  1848. print_chr(' '); print_hex(node->u.w); return;
  1849. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1850. f:
  1851. ~~
  1852. print_chr(' ');
  1853. ~~~~~~~~~~~~~~~
  1854. if (node->flag & jit_flag_data)
  1855. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1856. print_flt(*(jit_float32_t *)node->u.n->u.w);
  1857. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1858. else
  1859. ~~~~
  1860. print_flt(node->u.f);
  1861. ~~~~~~~~~~~~~~~~~~~~~
  1862. return;
  1863. ~~~~~~~
  1864. d:
  1865. ~~
  1866. print_chr(' ');
  1867. ~~~~~~~~~~~~~~~
  1868. if (node->flag & jit_flag_data)
  1869. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1870. print_flt(*(jit_float64_t *)node->u.n->u.w);
  1871. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1872. else
  1873. ~~~~
  1874. print_flt(node->u.d);
  1875. ~~~~~~~~~~~~~~~~~~~~~
  1876. return;
  1877. ~~~~~~~
  1878. n:
  1879. ~~
  1880. print_chr(' ');
  1881. ~~~~~~~~~~~~~~~
  1882. if (!(node->flag & jit_flag_node))
  1883. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1884. print_ptr(node->u.p);
  1885. ~~~~~~~~~~~~~~~~~~~~~
  1886. else {
  1887. ~~~~~~
  1888. print_chr('L');
  1889. ~~~~~~~~~~~~~~~
  1890. print_dec(node->u.n->v.w);
  1891. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1892. }
  1893. ~
  1894. return;
  1895. ~~~~~~~
  1896. a:
  1897. ~~
  1898. print_chr(' '); print_arg(node); return;
  1899. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1900. r_r:
  1901. ~~~~
  1902. print_chr(' '); print_reg(node->u.w);
  1903. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1904. print_chr(' '); print_reg(node->v.w); return;
  1905. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1906. r_w:
  1907. ~~~~
  1908. print_chr(' '); print_reg(node->u.w);
  1909. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1910. print_chr(' '); print_hex(node->v.w); return;
  1911. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1912. r_f:
  1913. ~~~~
  1914. print_chr(' '); print_reg(node->u.w);
  1915. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1916. print_chr(' ');
  1917. ~~~~~~~~~~~~~~~
  1918. if (node->flag & jit_flag_data)
  1919. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1920. print_flt(*(jit_float32_t *)node->v.n->u.w);
  1921. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1922. else
  1923. ~~~~
  1924. print_flt(node->v.f);
  1925. ~~~~~~~~~~~~~~~~~~~~~
  1926. return;
  1927. ~~~~~~~
  1928. r_d:
  1929. ~~~~
  1930. print_chr(' '); print_reg(node->u.w);
  1931. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1932. print_chr(' ');
  1933. ~~~~~~~~~~~~~~~
  1934. if (node->flag & jit_flag_data)
  1935. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1936. print_flt(*(jit_float64_t *)node->v.n->u.w);
  1937. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1938. else
  1939. ~~~~
  1940. print_flt(node->v.d);
  1941. ~~~~~~~~~~~~~~~~~~~~~
  1942. return;
  1943. ~~~~~~~
  1944. r_a:
  1945. ~~~~
  1946. print_chr(' '); print_reg(node->u.w);
  1947. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1948. print_chr(' '); print_arg(node->v.n);
  1949. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1950. return;
  1951. ~~~~~~~
  1952. w_r:
  1953. ~~~~
  1954. print_chr(' '); print_hex(node->u.w);
  1955. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1956. print_chr(' '); print_reg(node->v.w); return;
  1957. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1958. w_w:
  1959. ~~~~
  1960. print_chr(' '); print_hex(node->u.w);
  1961. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1962. print_chr(' '); print_hex(node->v.w); return;
  1963. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1964. w_a:
  1965. ~~~~
  1966. print_chr(' '); print_hex(node->u.w);
  1967. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1968. deps/lightning/lib/jit_print.c:196:22: note: in expansion of macro ‘print_hex’
  1969. print_chr(' '); print_hex(node->u.w);
  1970. ^~~~~~~~~
  1971. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1972. fprintf(print_stream, "0x%lx", value); \
  1973. ^
  1974. deps/lightning/lib/jit_print.c:196:32:
  1975. print_chr(' '); print_hex(node->u.w);
  1976. ~~~~~~~~~
  1977. deps/lightning/lib/jit_print.c:196:22: note: in expansion of macro ‘print_hex’
  1978. print_chr(' '); print_hex(node->u.w);
  1979. ^~~~~~~~~
  1980. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1981. #define print_dec(value) fprintf(print_stream, "%ld", value)
  1982. ^
  1983. deps/lightning/lib/jit_print.c:52:6: note: in expansion of macro ‘print_dec’
  1984. print_dec((value)->v.w); \
  1985. ^~~~~~~~~
  1986. deps/lightning/lib/jit_print.c:197:22: note: in expansion of macro ‘print_arg’
  1987. print_chr(' '); print_arg(node->v.n);
  1988. ^~~~~~~~~
  1989. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1990. #define print_dec(value) fprintf(print_stream, "%ld", value)
  1991. ^
  1992. deps/lightning/lib/jit_print.c:52:6: note: in expansion of macro ‘print_dec’
  1993. print_dec((value)->v.w); \
  1994. ^~~~~~~~~
  1995. deps/lightning/lib/jit_print.c:205:22: note: in expansion of macro ‘print_arg’
  1996. print_chr(' '); print_arg(node->v.n);
  1997. ^~~~~~~~~
  1998. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  1999. #define print_dec(value) fprintf(print_stream, "%ld", value)
  2000. ^
  2001. deps/lightning/lib/jit_print.c:52:6: note: in expansion of macro ‘print_dec’
  2002. print_dec((value)->v.w); \
  2003. ^~~~~~~~~
  2004. deps/lightning/lib/jit_print.c:213:22: note: in expansion of macro ‘print_arg’
  2005. print_chr(' '); print_arg(node->v.n);
  2006. ^~~~~~~~~
  2007. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  2008. fprintf(print_stream, "-0x%lx", -value); \
  2009. ^ ~~~~~~~~~~~~
  2010. else \
  2011. ~~~~~~~~~~~~~
  2012. fprintf(print_stream, "0x%lx", value); \
  2013. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2014. } while (0)
  2015. ~~~~~~~~~~~
  2016. #define print_dec(value) fprintf(print_stream, "%ld", value)
  2017. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2018. #define print_flt(value) fprintf(print_stream, "%g", value)
  2019. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2020. #define print_str(value) fprintf(print_stream, "%s", value)
  2021. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2022. #define print_ptr(value) fprintf(print_stream, "%p", value)
  2023. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2024. #define print_reg(value) \
  2025. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2026. do { \
  2027. ~~~~~~~~~~~~~
  2028. if ((value) & jit_regno_patch) \
  2029. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2030. print_chr('?'); \
  2031. ~~~~~~~~~~~~~~~~~~~~~~
  2032. print_str(_rvs[jit_regno(value)].name); \
  2033. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2034. } while (0)
  2035. ~~~~~~~~~~~
  2036. #define print_arg(value) \
  2037. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2038. do { \
  2039. ~~~~~~~~~~~~~
  2040. print_chr('#'); \
  2041. ~~~~~~~~~~~~~~~~~~~~~~~
  2042. if (value) \
  2043. ~~~~~~~~~~~~~~~~~~
  2044. print_dec((value)->v.w); \
  2045. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2046. else \
  2047. ~~~~~~~~~~~~~
  2048. print_chr('?'); \
  2049. ~~~~~~~~~~~~~~~~~~~~~~
  2050. } while (0)
  2051. ~~~~~~~~~~~
  2052.  
  2053.  
  2054. /*
  2055. ~~
  2056. * Initialization
  2057. ~~~~~~~~~~~~~~~~
  2058. */
  2059. ~~
  2060. #include "jit_names.c"
  2061. ~~~~~~~~~~~~~~~~~~~~~~
  2062. /*
  2063. ~~
  2064. * Initialization
  2065. ~~~~~~~~~~~~~~~~
  2066. */
  2067. ~~
  2068. static FILE *print_stream;
  2069. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  2070.  
  2071.  
  2072.  
  2073.  
  2074. /*
  2075. ~~
  2076. * Implementation
  2077. ~~~~~~~~~~~~~~~~
  2078. */
  2079. ~~
  2080. void
  2081. ~~~~
  2082. jit_init_print(void)
  2083. ~~~~~~~~~~~~~~~~~~~~
  2084. {
  2085. ~
  2086. if (!print_stream)
  2087. ~~~~~~~~~~~~~~~~~~
  2088. print_stream = stdout;
  2089. ~~~~~~~~~~~~~~~~~~~~~~
  2090. }
  2091. ~
  2092.  
  2093.  
  2094. void
  2095. ~~~~
  2096. _jit_print(jit_state_t *_jit)
  2097. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2098. {
  2099. ~
  2100. jit_node_t *node;
  2101. ~~~~~~~~~~~~~~~~~~
  2102.  
  2103.  
  2104. if ((node = _jitc->head)) {
  2105. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2106. jit_print_node(node);
  2107. ~~~~~~~~~~~~~~~~~~~~~
  2108. for (node = node->next; node; node = node->next) {
  2109. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2110. print_chr('\n');
  2111. ~~~~~~~~~~~~~~~~
  2112. jit_print_node(node);
  2113. ~~~~~~~~~~~~~~~~~~~~~
  2114. }
  2115. ~
  2116. print_chr('\n');
  2117. ~~~~~~~~~~~~~~~~
  2118. }
  2119. ~
  2120. }
  2121. ~
  2122.  
  2123.  
  2124. void
  2125. ~~~~
  2126. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  2127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2128. {
  2129. ~
  2130. jit_block_t *block;
  2131. ~~~~~~~~~~~~~~~~~~~~
  2132. jit_int32_t value;
  2133. ~~~~~~~~~~~~~~~~~~~~
  2134. jit_int32_t offset;
  2135. ~~~~~~~~~~~~~~~~~~~~~
  2136.  
  2137.  
  2138. if (node->code == jit_code_label ||
  2139. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2140. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  2141. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2142. print_chr('L');
  2143. ~~~~~~~~~~~~~~~
  2144. print_dec(node->v.w);
  2145. ~~~~~~~~~~~~~~~~~~~~~
  2146. print_chr(':');
  2147. ~~~~~~~~~~~~~~~
  2148. block = _jitc->blocks.ptr + node->v.w;
  2149. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2150. for (offset = 0; offset < _jitc->reglen; offset++) {
  2151. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2152. if (jit_regset_tstbit(&block->reglive, offset)) {
  2153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2154. print_chr(' ');
  2155. ~~~~~~~~~~~~~~~
  2156. print_reg(offset);
  2157. ~~~~~~~~~~~~~~~~~~
  2158. }
  2159. ~
  2160. }
  2161. ~
  2162. if (node->code == jit_code_prolog ||
  2163. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2164. node->code == jit_code_epilog) {
  2165. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2166. print_str(" /* ");
  2167. ~~~~~~~~~~~~~~~~~~
  2168. print_str(code_name[node->code]);
  2169. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2170. print_str(" */");
  2171. ~~~~~~~~~~~~~~~~~
  2172. }
  2173. ~
  2174. return;
  2175. ~~~~~~~
  2176. }
  2177. ~
  2178. value = jit_classify(node->code) &
  2179. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2180. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  2181. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2182. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  2183. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2184. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  2185. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2186. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  2187. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2188. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  2189. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2190. node->code == jit_code_finishr ||
  2191. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2192. node->code == jit_code_finishi))
  2193. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2194. print_str(" ");
  2195. ~~~~~~~~~~~~~~~~~~
  2196. else
  2197. ~~~~
  2198. print_chr('\t');
  2199. ~~~~~~~~~~~~~~~~
  2200. if (node->flag & jit_flag_synth)
  2201. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2202. print_str(" \\__ ");
  2203. ~~~~~~~~~~~~~~~~~~~~
  2204. print_str(code_name[node->code]);
  2205. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2206. switch (node->code) {
  2207. ~~~~~~~~~~~~~~~~~~~~~
  2208. r:
  2209. ~~
  2210. print_chr(' '); print_reg(node->u.w); return;
  2211. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2212. w:
  2213. ~~
  2214. print_chr(' '); print_hex(node->u.w); return;
  2215. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2216. f:
  2217. ~~
  2218. print_chr(' ');
  2219. ~~~~~~~~~~~~~~~
  2220. if (node->flag & jit_flag_data)
  2221. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2222. print_flt(*(jit_float32_t *)node->u.n->u.w);
  2223. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2224. else
  2225. ~~~~
  2226. print_flt(node->u.f);
  2227. ~~~~~~~~~~~~~~~~~~~~~
  2228. return;
  2229. ~~~~~~~
  2230. d:
  2231. ~~
  2232. print_chr(' ');
  2233. ~~~~~~~~~~~~~~~
  2234. if (node->flag & jit_flag_data)
  2235. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2236. print_flt(*(jit_float64_t *)node->u.n->u.w);
  2237. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2238. else
  2239. ~~~~
  2240. print_flt(node->u.d);
  2241. ~~~~~~~~~~~~~~~~~~~~~
  2242. return;
  2243. ~~~~~~~
  2244. n:
  2245. ~~
  2246. print_chr(' ');
  2247. ~~~~~~~~~~~~~~~
  2248. if (!(node->flag & jit_flag_node))
  2249. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2250. print_ptr(node->u.p);
  2251. ~~~~~~~~~~~~~~~~~~~~~
  2252. else {
  2253. ~~~~~~
  2254. print_chr('L');
  2255. ~~~~~~~~~~~~~~~
  2256. print_dec(node->u.n->v.w);
  2257. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  2258. }
  2259. ~
  2260. return;
  2261. ~~~~~~~
  2262. a:
  2263. ~~
  2264. print_chr(' '); print_arg(node); return;
  2265. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2266. r_r:
  2267. ~~~~
  2268. print_chr(' '); print_reg(node->u.w);
  2269. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2270. print_chr(' '); print_reg(node->v.w); return;
  2271. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2272. r_w:
  2273. ~~~~
  2274. print_chr(' '); print_reg(node->u.w);
  2275. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2276. print_chr(' '); print_hex(node->v.w); return;
  2277. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2278. r_f:
  2279. ~~~~
  2280. print_chr(' '); print_reg(node->u.w);
  2281. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2282. print_chr(' ');
  2283. ~~~~~~~~~~~~~~~
  2284. if (node->flag & jit_flag_data)
  2285. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2286. print_flt(*(jit_float32_t *)node->v.n->u.w);
  2287. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2288. else
  2289. ~~~~
  2290. print_flt(node->v.f);
  2291. ~~~~~~~~~~~~~~~~~~~~~
  2292. return;
  2293. ~~~~~~~
  2294. r_d:
  2295. ~~~~
  2296. print_chr(' '); print_reg(node->u.w);
  2297. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2298. print_chr(' ');
  2299. ~~~~~~~~~~~~~~~
  2300. if (node->flag & jit_flag_data)
  2301. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2302. print_flt(*(jit_float64_t *)node->v.n->u.w);
  2303. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2304. else
  2305. ~~~~
  2306. print_flt(node->v.d);
  2307. ~~~~~~~~~~~~~~~~~~~~~
  2308. return;
  2309. ~~~~~~~
  2310. r_a:
  2311. ~~~~
  2312. print_chr(' '); print_reg(node->u.w);
  2313. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2314. print_chr(' '); print_arg(node->v.n);
  2315. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2316. return;
  2317. ~~~~~~~
  2318. w_r:
  2319. ~~~~
  2320. print_chr(' '); print_hex(node->u.w);
  2321. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2322. print_chr(' '); print_reg(node->v.w); return;
  2323. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2324. w_w:
  2325. ~~~~
  2326. print_chr(' '); print_hex(node->u.w);
  2327. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2328. print_chr(' '); print_hex(node->v.w); return;
  2329. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2330. w_a:
  2331. ~~~~
  2332. print_chr(' '); print_hex(node->u.w);
  2333. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2334. print_chr(' '); print_arg(node->v.n);
  2335. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2336. return;
  2337. ~~~~~~~
  2338. f_a:
  2339. ~~~~
  2340. print_chr(' ');
  2341. ~~~~~~~~~~~~~~~
  2342. if (node->flag & jit_flag_data)
  2343. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2344. print_flt(*(jit_float32_t *)node->u.n->u.w);
  2345. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2346. else
  2347. ~~~~
  2348. print_flt(node->u.f);
  2349. ~~~~~~~~~~~~~~~~~~~~~
  2350. print_chr(' '); print_arg(node->v.n);
  2351. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2352. return;
  2353. ~~~~~~~
  2354. d_a:
  2355. ~~~~
  2356. print_chr(' ');
  2357. ~~~~~~~~~~~~~~~
  2358. if (node->flag & jit_flag_data)
  2359. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2360. print_flt(*(jit_float64_t *)node->u.n->u.w);
  2361. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2362. else
  2363. ~~~~
  2364. print_flt(node->u.d);
  2365. ~~~~~~~~~~~~~~~~~~~~~
  2366. print_chr(' '); print_arg(node->v.n);
  2367. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2368. return;
  2369. ~~~~~~~
  2370. r_r_r:
  2371. ~~~~~~
  2372. print_chr(' '); print_reg(node->u.w);
  2373. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2374. print_chr(' '); print_reg(node->v.w);
  2375. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2376. print_chr(' '); print_reg(node->w.w); return;
  2377. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2378. r_r_w:
  2379. ~~~~~~
  2380. print_chr(' '); print_reg(node->u.w);
  2381. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2382. print_chr(' '); print_reg(node->v.w);
  2383. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2384. print_chr(' '); print_hex(node->w.w); return;
  2385. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2386. deps/lightning/lib/jit_print.c:222:22: note: in expansion of macro ‘print_hex’
  2387. print_chr(' '); print_hex(node->w.w); return;
  2388. ^~~~~~~~~
  2389. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  2390. fprintf(print_stream, "0x%lx", value); \
  2391. ^
  2392. deps/lightning/lib/jit_print.c:222:32:
  2393. print_chr(' '); print_hex(node->w.w); return;
  2394. ~~~~~~~~~
  2395. deps/lightning/lib/jit_print.c:222:22: note: in expansion of macro ‘print_hex’
  2396. print_chr(' '); print_hex(node->w.w); return;
  2397. ^~~~~~~~~
  2398. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  2399. fprintf(print_stream, "-0x%lx", -value); \
  2400. ^ ~~~~~~~~~~~~
  2401. else \
  2402. ~~~~~~~~~~~~~
  2403. fprintf(print_stream, "0x%lx", value); \
  2404. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2405. } while (0)
  2406. ~~~~~~~~~~~
  2407. #define print_dec(value) fprintf(print_stream, "%ld", value)
  2408. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2409. #define print_flt(value) fprintf(print_stream, "%g", value)
  2410. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2411. #define print_str(value) fprintf(print_stream, "%s", value)
  2412. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2413. #define print_ptr(value) fprintf(print_stream, "%p", value)
  2414. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2415. #define print_reg(value) \
  2416. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2417. do { \
  2418. ~~~~~~~~~~~~~
  2419. if ((value) & jit_regno_patch) \
  2420. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2421. print_chr('?'); \
  2422. ~~~~~~~~~~~~~~~~~~~~~~
  2423. print_str(_rvs[jit_regno(value)].name); \
  2424. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2425. } while (0)
  2426. ~~~~~~~~~~~
  2427. #define print_arg(value) \
  2428. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2429. do { \
  2430. ~~~~~~~~~~~~~
  2431. print_chr('#'); \
  2432. ~~~~~~~~~~~~~~~~~~~~~~~
  2433. if (value) \
  2434. ~~~~~~~~~~~~~~~~~~
  2435. print_dec((value)->v.w); \
  2436. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2437. else \
  2438. ~~~~~~~~~~~~~
  2439. print_chr('?'); \
  2440. ~~~~~~~~~~~~~~~~~~~~~~
  2441. } while (0)
  2442. ~~~~~~~~~~~
  2443.  
  2444.  
  2445. /*
  2446. ~~
  2447. * Initialization
  2448. ~~~~~~~~~~~~~~~~
  2449. */
  2450. ~~
  2451. #include "jit_names.c"
  2452. ~~~~~~~~~~~~~~~~~~~~~~
  2453. /*
  2454. ~~
  2455. * Initialization
  2456. ~~~~~~~~~~~~~~~~
  2457. */
  2458. ~~
  2459. static FILE *print_stream;
  2460. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  2461.  
  2462.  
  2463.  
  2464.  
  2465. /*
  2466. ~~
  2467. * Implementation
  2468. ~~~~~~~~~~~~~~~~
  2469. */
  2470. ~~
  2471. void
  2472. ~~~~
  2473. jit_init_print(void)
  2474. ~~~~~~~~~~~~~~~~~~~~
  2475. {
  2476. ~
  2477. if (!print_stream)
  2478. ~~~~~~~~~~~~~~~~~~
  2479. print_stream = stdout;
  2480. ~~~~~~~~~~~~~~~~~~~~~~
  2481. }
  2482. ~
  2483.  
  2484.  
  2485. void
  2486. ~~~~
  2487. _jit_print(jit_state_t *_jit)
  2488. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2489. {
  2490. ~
  2491. jit_node_t *node;
  2492. ~~~~~~~~~~~~~~~~~~
  2493.  
  2494.  
  2495. if ((node = _jitc->head)) {
  2496. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2497. jit_print_node(node);
  2498. ~~~~~~~~~~~~~~~~~~~~~
  2499. for (node = node->next; node; node = node->next) {
  2500. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2501. print_chr('\n');
  2502. ~~~~~~~~~~~~~~~~
  2503. jit_print_node(node);
  2504. ~~~~~~~~~~~~~~~~~~~~~
  2505. }
  2506. ~
  2507. print_chr('\n');
  2508. ~~~~~~~~~~~~~~~~
  2509. }
  2510. ~
  2511. }
  2512. ~
  2513.  
  2514.  
  2515. void
  2516. ~~~~
  2517. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  2518. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2519. {
  2520. ~
  2521. jit_block_t *block;
  2522. ~~~~~~~~~~~~~~~~~~~~
  2523. jit_int32_t value;
  2524. ~~~~~~~~~~~~~~~~~~~~
  2525. jit_int32_t offset;
  2526. ~~~~~~~~~~~~~~~~~~~~~
  2527.  
  2528.  
  2529. if (node->code == jit_code_label ||
  2530. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2531. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  2532. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2533. print_chr('L');
  2534. ~~~~~~~~~~~~~~~
  2535. print_dec(node->v.w);
  2536. ~~~~~~~~~~~~~~~~~~~~~
  2537. print_chr(':');
  2538. ~~~~~~~~~~~~~~~
  2539. block = _jitc->blocks.ptr + node->v.w;
  2540. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2541. for (offset = 0; offset < _jitc->reglen; offset++) {
  2542. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2543. if (jit_regset_tstbit(&block->reglive, offset)) {
  2544. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2545. print_chr(' ');
  2546. ~~~~~~~~~~~~~~~
  2547. print_reg(offset);
  2548. ~~~~~~~~~~~~~~~~~~
  2549. }
  2550. ~
  2551. }
  2552. ~
  2553. if (node->code == jit_code_prolog ||
  2554. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2555. node->code == jit_code_epilog) {
  2556. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2557. print_str(" /* ");
  2558. ~~~~~~~~~~~~~~~~~~
  2559. print_str(code_name[node->code]);
  2560. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2561. print_str(" */");
  2562. ~~~~~~~~~~~~~~~~~
  2563. }
  2564. ~
  2565. return;
  2566. ~~~~~~~
  2567. }
  2568. ~
  2569. value = jit_classify(node->code) &
  2570. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2571. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  2572. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2573. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  2574. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2575. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  2576. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2577. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  2578. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2579. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  2580. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2581. node->code == jit_code_finishr ||
  2582. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2583. node->code == jit_code_finishi))
  2584. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2585. print_str(" ");
  2586. ~~~~~~~~~~~~~~~~~~
  2587. else
  2588. ~~~~
  2589. print_chr('\t');
  2590. ~~~~~~~~~~~~~~~~
  2591. if (node->flag & jit_flag_synth)
  2592. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2593. print_str(" \\__ ");
  2594. ~~~~~~~~~~~~~~~~~~~~
  2595. print_str(code_name[node->code]);
  2596. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2597. switch (node->code) {
  2598. ~~~~~~~~~~~~~~~~~~~~~
  2599. r:
  2600. ~~
  2601. print_chr(' '); print_reg(node->u.w); return;
  2602. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2603. w:
  2604. ~~
  2605. print_chr(' '); print_hex(node->u.w); return;
  2606. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2607. f:
  2608. ~~
  2609. print_chr(' ');
  2610. ~~~~~~~~~~~~~~~
  2611. if (node->flag & jit_flag_data)
  2612. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2613. print_flt(*(jit_float32_t *)node->u.n->u.w);
  2614. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2615. else
  2616. ~~~~
  2617. print_flt(node->u.f);
  2618. ~~~~~~~~~~~~~~~~~~~~~
  2619. return;
  2620. ~~~~~~~
  2621. d:
  2622. ~~
  2623. print_chr(' ');
  2624. ~~~~~~~~~~~~~~~
  2625. if (node->flag & jit_flag_data)
  2626. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2627. print_flt(*(jit_float64_t *)node->u.n->u.w);
  2628. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2629. else
  2630. ~~~~
  2631. print_flt(node->u.d);
  2632. ~~~~~~~~~~~~~~~~~~~~~
  2633. return;
  2634. ~~~~~~~
  2635. n:
  2636. ~~
  2637. print_chr(' ');
  2638. ~~~~~~~~~~~~~~~
  2639. if (!(node->flag & jit_flag_node))
  2640. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2641. print_ptr(node->u.p);
  2642. ~~~~~~~~~~~~~~~~~~~~~
  2643. else {
  2644. ~~~~~~
  2645. print_chr('L');
  2646. ~~~~~~~~~~~~~~~
  2647. print_dec(node->u.n->v.w);
  2648. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  2649. }
  2650. ~
  2651. return;
  2652. ~~~~~~~
  2653. a:
  2654. ~~
  2655. print_chr(' '); print_arg(node); return;
  2656. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2657. r_r:
  2658. ~~~~
  2659. print_chr(' '); print_reg(node->u.w);
  2660. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2661. print_chr(' '); print_reg(node->v.w); return;
  2662. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2663. r_w:
  2664. ~~~~
  2665. print_chr(' '); print_reg(node->u.w);
  2666. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2667. print_chr(' '); print_hex(node->v.w); return;
  2668. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2669. r_f:
  2670. ~~~~
  2671. print_chr(' '); print_reg(node->u.w);
  2672. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2673. print_chr(' ');
  2674. ~~~~~~~~~~~~~~~
  2675. if (node->flag & jit_flag_data)
  2676. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2677. print_flt(*(jit_float32_t *)node->v.n->u.w);
  2678. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2679. else
  2680. ~~~~
  2681. print_flt(node->v.f);
  2682. ~~~~~~~~~~~~~~~~~~~~~
  2683. return;
  2684. ~~~~~~~
  2685. r_d:
  2686. ~~~~
  2687. print_chr(' '); print_reg(node->u.w);
  2688. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2689. print_chr(' ');
  2690. ~~~~~~~~~~~~~~~
  2691. if (node->flag & jit_flag_data)
  2692. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2693. print_flt(*(jit_float64_t *)node->v.n->u.w);
  2694. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2695. else
  2696. ~~~~
  2697. print_flt(node->v.d);
  2698. ~~~~~~~~~~~~~~~~~~~~~
  2699. return;
  2700. ~~~~~~~
  2701. r_a:
  2702. ~~~~
  2703. print_chr(' '); print_reg(node->u.w);
  2704. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2705. print_chr(' '); print_arg(node->v.n);
  2706. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2707. return;
  2708. ~~~~~~~
  2709. w_r:
  2710. ~~~~
  2711. print_chr(' '); print_hex(node->u.w);
  2712. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2713. print_chr(' '); print_reg(node->v.w); return;
  2714. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2715. w_w:
  2716. ~~~~
  2717. print_chr(' '); print_hex(node->u.w);
  2718. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2719. print_chr(' '); print_hex(node->v.w); return;
  2720. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2721. w_a:
  2722. ~~~~
  2723. print_chr(' '); print_hex(node->u.w);
  2724. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2725. print_chr(' '); print_arg(node->v.n);
  2726. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2727. return;
  2728. ~~~~~~~
  2729. f_a:
  2730. ~~~~
  2731. print_chr(' ');
  2732. ~~~~~~~~~~~~~~~
  2733. if (node->flag & jit_flag_data)
  2734. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2735. print_flt(*(jit_float32_t *)node->u.n->u.w);
  2736. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2737. else
  2738. ~~~~
  2739. print_flt(node->u.f);
  2740. ~~~~~~~~~~~~~~~~~~~~~
  2741. print_chr(' '); print_arg(node->v.n);
  2742. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2743. return;
  2744. ~~~~~~~
  2745. d_a:
  2746. ~~~~
  2747. print_chr(' ');
  2748. ~~~~~~~~~~~~~~~
  2749. if (node->flag & jit_flag_data)
  2750. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2751. print_flt(*(jit_float64_t *)node->u.n->u.w);
  2752. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2753. else
  2754. ~~~~
  2755. print_flt(node->u.d);
  2756. ~~~~~~~~~~~~~~~~~~~~~
  2757. print_chr(' '); print_arg(node->v.n);
  2758. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2759. return;
  2760. ~~~~~~~
  2761. r_r_r:
  2762. ~~~~~~
  2763. print_chr(' '); print_reg(node->u.w);
  2764. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2765. print_chr(' '); print_reg(node->v.w);
  2766. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2767. print_chr(' '); print_reg(node->w.w); return;
  2768. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2769. r_r_w:
  2770. ~~~~~~
  2771. print_chr(' '); print_reg(node->u.w);
  2772. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2773. print_chr(' '); print_reg(node->v.w);
  2774. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2775. print_chr(' '); print_hex(node->w.w); return;
  2776. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2777. q_r_r:
  2778. ~~~~~~
  2779. print_str(" ("); print_reg(node->u.q.l);
  2780. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2781. print_chr(' '); print_reg(node->u.q.h);
  2782. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2783. print_str(") "); print_reg(node->v.w);
  2784. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2785. print_chr(' '); print_reg(node->w.w); return;
  2786. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2787. q_r_w:
  2788. ~~~~~~
  2789. print_str(" ("); print_reg(node->u.q.l);
  2790. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2791. print_chr(' '); print_reg(node->u.q.h);
  2792. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2793. print_str(") "); print_reg(node->v.w);
  2794. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2795. print_chr(' '); print_hex(node->w.w); return;
  2796. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2797. deps/lightning/lib/jit_print.c:232:22: note: in expansion of macro ‘print_hex’
  2798. print_chr(' '); print_hex(node->w.w); return;
  2799. ^~~~~~~~~
  2800. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  2801. fprintf(print_stream, "0x%lx", value); \
  2802. ^
  2803. deps/lightning/lib/jit_print.c:232:32:
  2804. print_chr(' '); print_hex(node->w.w); return;
  2805. ~~~~~~~~~
  2806. deps/lightning/lib/jit_print.c:232:22: note: in expansion of macro ‘print_hex’
  2807. print_chr(' '); print_hex(node->w.w); return;
  2808. ^~~~~~~~~
  2809. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  2810. fprintf(print_stream, "-0x%lx", -value); \
  2811. ^ ~~~~~~~~~~~~
  2812. else \
  2813. ~~~~~~~~~~~~~
  2814. fprintf(print_stream, "0x%lx", value); \
  2815. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2816. } while (0)
  2817. ~~~~~~~~~~~
  2818. #define print_dec(value) fprintf(print_stream, "%ld", value)
  2819. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2820. #define print_flt(value) fprintf(print_stream, "%g", value)
  2821. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2822. #define print_str(value) fprintf(print_stream, "%s", value)
  2823. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2824. #define print_ptr(value) fprintf(print_stream, "%p", value)
  2825. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2826. #define print_reg(value) \
  2827. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2828. do { \
  2829. ~~~~~~~~~~~~~
  2830. if ((value) & jit_regno_patch) \
  2831. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2832. print_chr('?'); \
  2833. ~~~~~~~~~~~~~~~~~~~~~~
  2834. print_str(_rvs[jit_regno(value)].name); \
  2835. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2836. } while (0)
  2837. ~~~~~~~~~~~
  2838. #define print_arg(value) \
  2839. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2840. do { \
  2841. ~~~~~~~~~~~~~
  2842. print_chr('#'); \
  2843. ~~~~~~~~~~~~~~~~~~~~~~~
  2844. if (value) \
  2845. ~~~~~~~~~~~~~~~~~~
  2846. print_dec((value)->v.w); \
  2847. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2848. else \
  2849. ~~~~~~~~~~~~~
  2850. print_chr('?'); \
  2851. ~~~~~~~~~~~~~~~~~~~~~~
  2852. } while (0)
  2853. ~~~~~~~~~~~
  2854.  
  2855.  
  2856. /*
  2857. ~~
  2858. * Initialization
  2859. ~~~~~~~~~~~~~~~~
  2860. */
  2861. ~~
  2862. #include "jit_names.c"
  2863. ~~~~~~~~~~~~~~~~~~~~~~
  2864. /*
  2865. ~~
  2866. * Initialization
  2867. ~~~~~~~~~~~~~~~~
  2868. */
  2869. ~~
  2870. static FILE *print_stream;
  2871. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  2872.  
  2873.  
  2874.  
  2875.  
  2876. /*
  2877. ~~
  2878. * Implementation
  2879. ~~~~~~~~~~~~~~~~
  2880. */
  2881. ~~
  2882. void
  2883. ~~~~
  2884. jit_init_print(void)
  2885. ~~~~~~~~~~~~~~~~~~~~
  2886. {
  2887. ~
  2888. if (!print_stream)
  2889. ~~~~~~~~~~~~~~~~~~
  2890. print_stream = stdout;
  2891. ~~~~~~~~~~~~~~~~~~~~~~
  2892. }
  2893. ~
  2894.  
  2895.  
  2896. void
  2897. ~~~~
  2898. _jit_print(jit_state_t *_jit)
  2899. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2900. {
  2901. ~
  2902. jit_node_t *node;
  2903. ~~~~~~~~~~~~~~~~~~
  2904.  
  2905.  
  2906. if ((node = _jitc->head)) {
  2907. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2908. jit_print_node(node);
  2909. ~~~~~~~~~~~~~~~~~~~~~
  2910. for (node = node->next; node; node = node->next) {
  2911. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2912. print_chr('\n');
  2913. ~~~~~~~~~~~~~~~~
  2914. jit_print_node(node);
  2915. ~~~~~~~~~~~~~~~~~~~~~
  2916. }
  2917. ~
  2918. print_chr('\n');
  2919. ~~~~~~~~~~~~~~~~
  2920. }
  2921. ~
  2922. }
  2923. ~
  2924.  
  2925.  
  2926. void
  2927. ~~~~
  2928. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  2929. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2930. {
  2931. ~
  2932. jit_block_t *block;
  2933. ~~~~~~~~~~~~~~~~~~~~
  2934. jit_int32_t value;
  2935. ~~~~~~~~~~~~~~~~~~~~
  2936. jit_int32_t offset;
  2937. ~~~~~~~~~~~~~~~~~~~~~
  2938.  
  2939.  
  2940. if (node->code == jit_code_label ||
  2941. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2942. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  2943. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2944. print_chr('L');
  2945. ~~~~~~~~~~~~~~~
  2946. print_dec(node->v.w);
  2947. ~~~~~~~~~~~~~~~~~~~~~
  2948. print_chr(':');
  2949. ~~~~~~~~~~~~~~~
  2950. block = _jitc->blocks.ptr + node->v.w;
  2951. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2952. for (offset = 0; offset < _jitc->reglen; offset++) {
  2953. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2954. if (jit_regset_tstbit(&block->reglive, offset)) {
  2955. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2956. print_chr(' ');
  2957. ~~~~~~~~~~~~~~~
  2958. print_reg(offset);
  2959. ~~~~~~~~~~~~~~~~~~
  2960. }
  2961. ~
  2962. }
  2963. ~
  2964. if (node->code == jit_code_prolog ||
  2965. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2966. node->code == jit_code_epilog) {
  2967. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2968. print_str(" /* ");
  2969. ~~~~~~~~~~~~~~~~~~
  2970. print_str(code_name[node->code]);
  2971. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2972. print_str(" */");
  2973. ~~~~~~~~~~~~~~~~~
  2974. }
  2975. ~
  2976. return;
  2977. ~~~~~~~
  2978. }
  2979. ~
  2980. value = jit_classify(node->code) &
  2981. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2982. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  2983. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2984. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  2985. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2986. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  2987. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2988. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  2989. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2990. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  2991. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2992. node->code == jit_code_finishr ||
  2993. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2994. node->code == jit_code_finishi))
  2995. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2996. print_str(" ");
  2997. ~~~~~~~~~~~~~~~~~~
  2998. else
  2999. ~~~~
  3000. print_chr('\t');
  3001. ~~~~~~~~~~~~~~~~
  3002. if (node->flag & jit_flag_synth)
  3003. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3004. print_str(" \\__ ");
  3005. ~~~~~~~~~~~~~~~~~~~~
  3006. print_str(code_name[node->code]);
  3007. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3008. switch (node->code) {
  3009. ~~~~~~~~~~~~~~~~~~~~~
  3010. r:
  3011. ~~
  3012. print_chr(' '); print_reg(node->u.w); return;
  3013. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3014. w:
  3015. ~~
  3016. print_chr(' '); print_hex(node->u.w); return;
  3017. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3018. f:
  3019. ~~
  3020. print_chr(' ');
  3021. ~~~~~~~~~~~~~~~
  3022. if (node->flag & jit_flag_data)
  3023. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3024. print_flt(*(jit_float32_t *)node->u.n->u.w);
  3025. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3026. else
  3027. ~~~~
  3028. print_flt(node->u.f);
  3029. ~~~~~~~~~~~~~~~~~~~~~
  3030. return;
  3031. ~~~~~~~
  3032. d:
  3033. ~~
  3034. print_chr(' ');
  3035. ~~~~~~~~~~~~~~~
  3036. if (node->flag & jit_flag_data)
  3037. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3038. print_flt(*(jit_float64_t *)node->u.n->u.w);
  3039. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3040. else
  3041. ~~~~
  3042. print_flt(node->u.d);
  3043. ~~~~~~~~~~~~~~~~~~~~~
  3044. return;
  3045. ~~~~~~~
  3046. n:
  3047. ~~
  3048. print_chr(' ');
  3049. ~~~~~~~~~~~~~~~
  3050. if (!(node->flag & jit_flag_node))
  3051. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3052. print_ptr(node->u.p);
  3053. ~~~~~~~~~~~~~~~~~~~~~
  3054. else {
  3055. ~~~~~~
  3056. print_chr('L');
  3057. ~~~~~~~~~~~~~~~
  3058. print_dec(node->u.n->v.w);
  3059. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  3060. }
  3061. ~
  3062. return;
  3063. ~~~~~~~
  3064. a:
  3065. ~~
  3066. print_chr(' '); print_arg(node); return;
  3067. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3068. r_r:
  3069. ~~~~
  3070. print_chr(' '); print_reg(node->u.w);
  3071. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3072. print_chr(' '); print_reg(node->v.w); return;
  3073. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3074. r_w:
  3075. ~~~~
  3076. print_chr(' '); print_reg(node->u.w);
  3077. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3078. print_chr(' '); print_hex(node->v.w); return;
  3079. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3080. r_f:
  3081. ~~~~
  3082. print_chr(' '); print_reg(node->u.w);
  3083. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3084. print_chr(' ');
  3085. ~~~~~~~~~~~~~~~
  3086. if (node->flag & jit_flag_data)
  3087. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3088. print_flt(*(jit_float32_t *)node->v.n->u.w);
  3089. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3090. else
  3091. ~~~~
  3092. print_flt(node->v.f);
  3093. ~~~~~~~~~~~~~~~~~~~~~
  3094. return;
  3095. ~~~~~~~
  3096. r_d:
  3097. ~~~~
  3098. print_chr(' '); print_reg(node->u.w);
  3099. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3100. print_chr(' ');
  3101. ~~~~~~~~~~~~~~~
  3102. if (node->flag & jit_flag_data)
  3103. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3104. print_flt(*(jit_float64_t *)node->v.n->u.w);
  3105. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3106. else
  3107. ~~~~
  3108. print_flt(node->v.d);
  3109. ~~~~~~~~~~~~~~~~~~~~~
  3110. return;
  3111. ~~~~~~~
  3112. r_a:
  3113. ~~~~
  3114. print_chr(' '); print_reg(node->u.w);
  3115. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3116. print_chr(' '); print_arg(node->v.n);
  3117. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3118. return;
  3119. ~~~~~~~
  3120. w_r:
  3121. ~~~~
  3122. print_chr(' '); print_hex(node->u.w);
  3123. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3124. print_chr(' '); print_reg(node->v.w); return;
  3125. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3126. w_w:
  3127. ~~~~
  3128. print_chr(' '); print_hex(node->u.w);
  3129. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3130. print_chr(' '); print_hex(node->v.w); return;
  3131. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3132. w_a:
  3133. ~~~~
  3134. print_chr(' '); print_hex(node->u.w);
  3135. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3136. print_chr(' '); print_arg(node->v.n);
  3137. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3138. return;
  3139. ~~~~~~~
  3140. f_a:
  3141. ~~~~
  3142. print_chr(' ');
  3143. ~~~~~~~~~~~~~~~
  3144. if (node->flag & jit_flag_data)
  3145. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3146. print_flt(*(jit_float32_t *)node->u.n->u.w);
  3147. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3148. else
  3149. ~~~~
  3150. print_flt(node->u.f);
  3151. ~~~~~~~~~~~~~~~~~~~~~
  3152. print_chr(' '); print_arg(node->v.n);
  3153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3154. return;
  3155. ~~~~~~~
  3156. d_a:
  3157. ~~~~
  3158. print_chr(' ');
  3159. ~~~~~~~~~~~~~~~
  3160. if (node->flag & jit_flag_data)
  3161. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3162. print_flt(*(jit_float64_t *)node->u.n->u.w);
  3163. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3164. else
  3165. ~~~~
  3166. print_flt(node->u.d);
  3167. ~~~~~~~~~~~~~~~~~~~~~
  3168. print_chr(' '); print_arg(node->v.n);
  3169. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3170. return;
  3171. ~~~~~~~
  3172. r_r_r:
  3173. ~~~~~~
  3174. print_chr(' '); print_reg(node->u.w);
  3175. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3176. print_chr(' '); print_reg(node->v.w);
  3177. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3178. print_chr(' '); print_reg(node->w.w); return;
  3179. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3180. r_r_w:
  3181. ~~~~~~
  3182. print_chr(' '); print_reg(node->u.w);
  3183. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3184. print_chr(' '); print_reg(node->v.w);
  3185. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3186. print_chr(' '); print_hex(node->w.w); return;
  3187. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3188. q_r_r:
  3189. ~~~~~~
  3190. print_str(" ("); print_reg(node->u.q.l);
  3191. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3192. print_chr(' '); print_reg(node->u.q.h);
  3193. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3194. print_str(") "); print_reg(node->v.w);
  3195. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3196. print_chr(' '); print_reg(node->w.w); return;
  3197. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3198. q_r_w:
  3199. ~~~~~~
  3200. print_str(" ("); print_reg(node->u.q.l);
  3201. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3202. print_chr(' '); print_reg(node->u.q.h);
  3203. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3204. print_str(") "); print_reg(node->v.w);
  3205. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3206. print_chr(' '); print_hex(node->w.w); return;
  3207. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3208. r_r_q:
  3209. ~~~~~~
  3210. print_chr(' '); print_reg(node->u.w);
  3211. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3212. print_chr(' '); print_reg(node->v.w);
  3213. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3214. print_str(" ("); print_reg(node->w.q.l);
  3215. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3216. print_chr(' '); print_reg(node->w.q.h);
  3217. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3218. print_str(") "); return;
  3219. ~~~~~~~~~~~~~~~~~~~~~~~~
  3220. r_w_q:
  3221. ~~~~~~
  3222. print_chr(' '); print_reg(node->u.w);
  3223. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3224. print_chr(' '); print_hex(node->v.w);
  3225. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3226. deps/lightning/lib/jit_print.c:241:22: note: in expansion of macro ‘print_hex’
  3227. print_chr(' '); print_hex(node->v.w);
  3228. ^~~~~~~~~
  3229. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  3230. fprintf(print_stream, "0x%lx", value); \
  3231. ^
  3232. deps/lightning/lib/jit_print.c:241:32:
  3233. print_chr(' '); print_hex(node->v.w);
  3234. ~~~~~~~~~
  3235. deps/lightning/lib/jit_print.c:241:22: note: in expansion of macro ‘print_hex’
  3236. print_chr(' '); print_hex(node->v.w);
  3237. ^~~~~~~~~
  3238. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  3239. fprintf(print_stream, "-0x%lx", -value); \
  3240. ^ ~~~~~~~~~~~~
  3241. else \
  3242. ~~~~~~~~~~~~~
  3243. fprintf(print_stream, "0x%lx", value); \
  3244. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3245. } while (0)
  3246. ~~~~~~~~~~~
  3247. #define print_dec(value) fprintf(print_stream, "%ld", value)
  3248. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3249. #define print_flt(value) fprintf(print_stream, "%g", value)
  3250. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3251. #define print_str(value) fprintf(print_stream, "%s", value)
  3252. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3253. #define print_ptr(value) fprintf(print_stream, "%p", value)
  3254. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3255. #define print_reg(value) \
  3256. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3257. do { \
  3258. ~~~~~~~~~~~~~
  3259. if ((value) & jit_regno_patch) \
  3260. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3261. print_chr('?'); \
  3262. ~~~~~~~~~~~~~~~~~~~~~~
  3263. print_str(_rvs[jit_regno(value)].name); \
  3264. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3265. } while (0)
  3266. ~~~~~~~~~~~
  3267. #define print_arg(value) \
  3268. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3269. do { \
  3270. ~~~~~~~~~~~~~
  3271. print_chr('#'); \
  3272. ~~~~~~~~~~~~~~~~~~~~~~~
  3273. if (value) \
  3274. ~~~~~~~~~~~~~~~~~~
  3275. print_dec((value)->v.w); \
  3276. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3277. else \
  3278. ~~~~~~~~~~~~~
  3279. print_chr('?'); \
  3280. ~~~~~~~~~~~~~~~~~~~~~~
  3281. } while (0)
  3282. ~~~~~~~~~~~
  3283.  
  3284.  
  3285. /*
  3286. ~~
  3287. * Initialization
  3288. ~~~~~~~~~~~~~~~~
  3289. */
  3290. ~~
  3291. #include "jit_names.c"
  3292. ~~~~~~~~~~~~~~~~~~~~~~
  3293. /*
  3294. ~~
  3295. * Initialization
  3296. ~~~~~~~~~~~~~~~~
  3297. */
  3298. ~~
  3299. static FILE *print_stream;
  3300. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  3301.  
  3302.  
  3303.  
  3304.  
  3305. /*
  3306. ~~
  3307. * Implementation
  3308. ~~~~~~~~~~~~~~~~
  3309. */
  3310. ~~
  3311. void
  3312. ~~~~
  3313. jit_init_print(void)
  3314. ~~~~~~~~~~~~~~~~~~~~
  3315. {
  3316. ~
  3317. if (!print_stream)
  3318. ~~~~~~~~~~~~~~~~~~
  3319. print_stream = stdout;
  3320. ~~~~~~~~~~~~~~~~~~~~~~
  3321. }
  3322. ~
  3323.  
  3324.  
  3325. void
  3326. ~~~~
  3327. _jit_print(jit_state_t *_jit)
  3328. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3329. {
  3330. ~
  3331. jit_node_t *node;
  3332. ~~~~~~~~~~~~~~~~~~
  3333.  
  3334.  
  3335. if ((node = _jitc->head)) {
  3336. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3337. jit_print_node(node);
  3338. ~~~~~~~~~~~~~~~~~~~~~
  3339. for (node = node->next; node; node = node->next) {
  3340. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3341. print_chr('\n');
  3342. ~~~~~~~~~~~~~~~~
  3343. jit_print_node(node);
  3344. ~~~~~~~~~~~~~~~~~~~~~
  3345. }
  3346. ~
  3347. print_chr('\n');
  3348. ~~~~~~~~~~~~~~~~
  3349. }
  3350. ~
  3351. }
  3352. ~
  3353.  
  3354.  
  3355. void
  3356. ~~~~
  3357. _jit_print_node(jit_state_t *_jit, jit_node_t *node)
  3358. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3359. {
  3360. ~
  3361. jit_block_t *block;
  3362. ~~~~~~~~~~~~~~~~~~~~
  3363. jit_int32_t value;
  3364. ~~~~~~~~~~~~~~~~~~~~
  3365. jit_int32_t offset;
  3366. ~~~~~~~~~~~~~~~~~~~~~
  3367.  
  3368.  
  3369. if (node->code == jit_code_label ||
  3370. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3371. node->code == jit_code_prolog || node->code == jit_code_epilog) {
  3372. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3373. print_chr('L');
  3374. ~~~~~~~~~~~~~~~
  3375. print_dec(node->v.w);
  3376. ~~~~~~~~~~~~~~~~~~~~~
  3377. print_chr(':');
  3378. ~~~~~~~~~~~~~~~
  3379. block = _jitc->blocks.ptr + node->v.w;
  3380. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3381. for (offset = 0; offset < _jitc->reglen; offset++) {
  3382. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3383. if (jit_regset_tstbit(&block->reglive, offset)) {
  3384. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3385. print_chr(' ');
  3386. ~~~~~~~~~~~~~~~
  3387. print_reg(offset);
  3388. ~~~~~~~~~~~~~~~~~~
  3389. }
  3390. ~
  3391. }
  3392. ~
  3393. if (node->code == jit_code_prolog ||
  3394. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3395. node->code == jit_code_epilog) {
  3396. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3397. print_str(" /* ");
  3398. ~~~~~~~~~~~~~~~~~~
  3399. print_str(code_name[node->code]);
  3400. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3401. print_str(" */");
  3402. ~~~~~~~~~~~~~~~~~
  3403. }
  3404. ~
  3405. return;
  3406. ~~~~~~~
  3407. }
  3408. ~
  3409. value = jit_classify(node->code) &
  3410. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3411. (jit_cc_a0_int|jit_cc_a0_flt|jit_cc_a0_dbl|jit_cc_a0_jmp|
  3412. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3413. jit_cc_a0_reg|jit_cc_a0_rlh|jit_cc_a0_arg|
  3414. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3415. jit_cc_a1_reg|jit_cc_a1_int|jit_cc_a1_flt|jit_cc_a1_dbl|jit_cc_a1_arg|
  3416. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3417. jit_cc_a2_reg|jit_cc_a2_int|jit_cc_a2_flt|jit_cc_a2_dbl|jit_cc_a2_rlh);
  3418. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3419. if (!(node->flag & jit_flag_synth) && ((value & jit_cc_a0_jmp) ||
  3420. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3421. node->code == jit_code_finishr ||
  3422. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3423. node->code == jit_code_finishi))
  3424. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3425. print_str(" ");
  3426. ~~~~~~~~~~~~~~~~~~
  3427. else
  3428. ~~~~
  3429. print_chr('\t');
  3430. ~~~~~~~~~~~~~~~~
  3431. if (node->flag & jit_flag_synth)
  3432. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3433. print_str(" \\__ ");
  3434. ~~~~~~~~~~~~~~~~~~~~
  3435. print_str(code_name[node->code]);
  3436. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3437. switch (node->code) {
  3438. ~~~~~~~~~~~~~~~~~~~~~
  3439. r:
  3440. ~~
  3441. print_chr(' '); print_reg(node->u.w); return;
  3442. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3443. w:
  3444. ~~
  3445. print_chr(' '); print_hex(node->u.w); return;
  3446. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3447. f:
  3448. ~~
  3449. print_chr(' ');
  3450. ~~~~~~~~~~~~~~~
  3451. if (node->flag & jit_flag_data)
  3452. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3453. print_flt(*(jit_float32_t *)node->u.n->u.w);
  3454. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3455. else
  3456. ~~~~
  3457. print_flt(node->u.f);
  3458. ~~~~~~~~~~~~~~~~~~~~~
  3459. return;
  3460. ~~~~~~~
  3461. d:
  3462. ~~
  3463. print_chr(' ');
  3464. ~~~~~~~~~~~~~~~
  3465. if (node->flag & jit_flag_data)
  3466. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3467. print_flt(*(jit_float64_t *)node->u.n->u.w);
  3468. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3469. else
  3470. ~~~~
  3471. print_flt(node->u.d);
  3472. ~~~~~~~~~~~~~~~~~~~~~
  3473. return;
  3474. ~~~~~~~
  3475. n:
  3476. ~~
  3477. print_chr(' ');
  3478. ~~~~~~~~~~~~~~~
  3479. if (!(node->flag & jit_flag_node))
  3480. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3481. print_ptr(node->u.p);
  3482. ~~~~~~~~~~~~~~~~~~~~~
  3483. else {
  3484. ~~~~~~
  3485. print_chr('L');
  3486. ~~~~~~~~~~~~~~~
  3487. print_dec(node->u.n->v.w);
  3488. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  3489. }
  3490. ~
  3491. return;
  3492. ~~~~~~~
  3493. a:
  3494. ~~
  3495. print_chr(' '); print_arg(node); return;
  3496. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3497. r_r:
  3498. ~~~~
  3499. print_chr(' '); print_reg(node->u.w);
  3500. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3501. print_chr(' '); print_reg(node->v.w); return;
  3502. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3503. r_w:
  3504. ~~~~
  3505. print_chr(' '); print_reg(node->u.w);
  3506. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3507. print_chr(' '); print_hex(node->v.w); return;
  3508. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3509. r_f:
  3510. ~~~~
  3511. print_chr(' '); print_reg(node->u.w);
  3512. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3513. print_chr(' ');
  3514. ~~~~~~~~~~~~~~~
  3515. if (node->flag & jit_flag_data)
  3516. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3517. print_flt(*(jit_float32_t *)node->v.n->u.w);
  3518. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3519. else
  3520. ~~~~
  3521. print_flt(node->v.f);
  3522. ~~~~~~~~~~~~~~~~~~~~~
  3523. return;
  3524. ~~~~~~~
  3525. r_d:
  3526. ~~~~
  3527. print_chr(' '); print_reg(node->u.w);
  3528. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3529. print_chr(' ');
  3530. ~~~~~~~~~~~~~~~
  3531. if (node->flag & jit_flag_data)
  3532. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3533. print_flt(*(jit_float64_t *)node->v.n->u.w);
  3534. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3535. else
  3536. ~~~~
  3537. print_flt(node->v.d);
  3538. ~~~~~~~~~~~~~~~~~~~~~
  3539. return;
  3540. ~~~~~~~
  3541. r_a:
  3542. ~~~~
  3543. print_chr(' '); print_reg(node->u.w);
  3544. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3545. print_chr(' '); print_arg(node->v.n);
  3546. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3547. return;
  3548. ~~~~~~~
  3549. w_r:
  3550. ~~~~
  3551. print_chr(' '); print_hex(node->u.w);
  3552. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3553. print_chr(' '); print_reg(node->v.w); return;
  3554. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3555. w_w:
  3556. ~~~~
  3557. print_chr(' '); print_hex(node->u.w);
  3558. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3559. print_chr(' '); print_hex(node->v.w); return;
  3560. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3561. w_a:
  3562. ~~~~
  3563. print_chr(' '); print_hex(node->u.w);
  3564. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3565. print_chr(' '); print_arg(node->v.n);
  3566. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3567. return;
  3568. ~~~~~~~
  3569. f_a:
  3570. ~~~~
  3571. print_chr(' ');
  3572. ~~~~~~~~~~~~~~~
  3573. if (node->flag & jit_flag_data)
  3574. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3575. print_flt(*(jit_float32_t *)node->u.n->u.w);
  3576. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3577. else
  3578. ~~~~
  3579. print_flt(node->u.f);
  3580. ~~~~~~~~~~~~~~~~~~~~~
  3581. print_chr(' '); print_arg(node->v.n);
  3582. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3583. return;
  3584. ~~~~~~~
  3585. d_a:
  3586. ~~~~
  3587. print_chr(' ');
  3588. ~~~~~~~~~~~~~~~
  3589. if (node->flag & jit_flag_data)
  3590. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3591. print_flt(*(jit_float64_t *)node->u.n->u.w);
  3592. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3593. else
  3594. ~~~~
  3595. print_flt(node->u.d);
  3596. ~~~~~~~~~~~~~~~~~~~~~
  3597. print_chr(' '); print_arg(node->v.n);
  3598. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3599. return;
  3600. ~~~~~~~
  3601. r_r_r:
  3602. ~~~~~~
  3603. print_chr(' '); print_reg(node->u.w);
  3604. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3605. print_chr(' '); print_reg(node->v.w);
  3606. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3607. print_chr(' '); print_reg(node->w.w); return;
  3608. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3609. r_r_w:
  3610. ~~~~~~
  3611. print_chr(' '); print_reg(node->u.w);
  3612. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3613. print_chr(' '); print_reg(node->v.w);
  3614. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3615. print_chr(' '); print_hex(node->w.w); return;
  3616. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3617. q_r_r:
  3618. ~~~~~~
  3619. print_str(" ("); print_reg(node->u.q.l);
  3620. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3621. print_chr(' '); print_reg(node->u.q.h);
  3622. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3623. print_str(") "); print_reg(node->v.w);
  3624. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3625. print_chr(' '); print_reg(node->w.w); return;
  3626. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3627. q_r_w:
  3628. ~~~~~~
  3629. print_str(" ("); print_reg(node->u.q.l);
  3630. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3631. print_chr(' '); print_reg(node->u.q.h);
  3632. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3633. print_str(") "); print_reg(node->v.w);
  3634. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3635. print_chr(' '); print_hex(node->w.w); return;
  3636. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3637. r_r_q:
  3638. ~~~~~~
  3639. print_chr(' '); print_reg(node->u.w);
  3640. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3641. print_chr(' '); print_reg(node->v.w);
  3642. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3643. print_str(" ("); print_reg(node->w.q.l);
  3644. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3645. print_chr(' '); print_reg(node->w.q.h);
  3646. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3647. print_str(") "); return;
  3648. ~~~~~~~~~~~~~~~~~~~~~~~~
  3649. r_w_q:
  3650. ~~~~~~
  3651. print_chr(' '); print_reg(node->u.w);
  3652. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3653. print_chr(' '); print_hex(node->v.w);
  3654. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3655. print_str(" ("); print_reg(node->w.q.l);
  3656. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3657. print_chr(' '); print_reg(node->w.q.h);
  3658. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3659. print_str(") "); return;
  3660. ~~~~~~~~~~~~~~~~~~~~~~~~
  3661. r_r_f:
  3662. ~~~~~~
  3663. print_chr(' '); print_reg(node->u.w);
  3664. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3665. print_chr(' '); print_reg(node->v.w);
  3666. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3667. print_chr(' ');
  3668. ~~~~~~~~~~~~~~~
  3669. if (node->flag & jit_flag_data)
  3670. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3671. print_flt(*(jit_float32_t *)node->w.n->u.w);
  3672. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3673. else
  3674. ~~~~
  3675. print_flt(node->w.f);
  3676. ~~~~~~~~~~~~~~~~~~~~~
  3677. return;
  3678. ~~~~~~~
  3679. r_r_d:
  3680. ~~~~~~
  3681. print_chr(' '); print_reg(node->u.w);
  3682. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3683. print_chr(' '); print_reg(node->v.w);
  3684. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3685. print_chr(' ');
  3686. ~~~~~~~~~~~~~~~
  3687. if (node->flag & jit_flag_data)
  3688. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3689. print_flt(*(jit_float64_t *)node->w.n->u.w);
  3690. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3691. else
  3692. ~~~~
  3693. print_flt(node->w.d);
  3694. ~~~~~~~~~~~~~~~~~~~~~
  3695. return;
  3696. ~~~~~~~
  3697. w_r_r:
  3698. ~~~~~~
  3699. print_chr(' '); print_hex(node->u.w);
  3700. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3701. deps/lightning/lib/jit_print.c:264:22: note: in expansion of macro ‘print_hex’
  3702. print_chr(' '); print_hex(node->u.w);
  3703. ^~~~~~~~~
  3704. deps/lightning/lib/jit_print.c:36:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  3705. fprintf(print_stream, "0x%lx", value); \
  3706. ^
  3707. deps/lightning/lib/jit_print.c:264:32:
  3708. print_chr(' '); print_hex(node->u.w);
  3709. ~~~~~~~~~
  3710. deps/lightning/lib/jit_print.c:264:22: note: in expansion of macro ‘print_hex’
  3711. print_chr(' '); print_hex(node->u.w);
  3712. ^~~~~~~~~
  3713. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  3714. #define print_dec(value) fprintf(print_stream, "%ld", value)
  3715. ^
  3716. deps/lightning/lib/jit_print.c:273:13:
  3717. print_dec(node->u.n->v.w);
  3718. ~~~~~~~~~~~~~~
  3719. deps/lightning/lib/jit_print.c:273:3: note: in expansion of macro ‘print_dec’
  3720. print_dec(node->u.n->v.w);
  3721. ^~~~~~~~~
  3722. deps/lightning/lib/jit_print.c:38:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  3723. #define print_dec(value) fprintf(print_stream, "%ld", value)
  3724. ^
  3725. deps/lightning/lib/jit_print.c:283:13:
  3726. print_dec(node->u.n->v.w);
  3727. ~~~~~~~~~~~~~~
  3728. deps/lightning/lib/jit_print.c:283:3: note: in expansion of macro ‘print_dec’
  3729. print_dec(node->u.n->v.w);
  3730. ^~~~~~~~~
  3731. deps/lightning/lib/jit_print.c:34:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘jit_word_t {aka int}’ [-Wformat=]
  3732. fprintf(print_stream, "-0x%lx", -value); \
  3733. ^ ~~~~~~~~~~~~
  3734. else \
  3735. ~~~~~~~~~~~~~
  3736. fprintf(print_stream, "0x%lx", value); \
  3737. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3738. } while (0)
  3739. ~~~~~~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment