Add string representation of IR codes to -sz.c files - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/size.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2014年10月17日 13:48:56 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2014年10月17日 13:48:56 -0300
commit624cf33d0815d8f5922cf0ccbc16322daf72acb5 (patch)
tree2b2a90ddb3bb5899b3e3dd8434eb837eb0a69279 /size.c
parent5c0c5bde6d7e23826d8957887883f32cf9915ec9 (diff)
downloadlightning-624cf33d0815d8f5922cf0ccbc16322daf72acb5.tar.gz
Add string representation of IR codes to -sz.c files
* lib/jit_names.c: New file with single definition of string representation of lightning IR codes. * size.c: Modified to append the code name in a C comment after the maximum instruction size. * lib/jit_print.c: Minor change to not duplicate jit_names.c contents. * lib/jit_aarch64-sz.c, lib/jit_alpha-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c, lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c, lib/jit_s390x-sz.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c: Rewritten to add string representation of IR codes in a C comment.
Diffstat (limited to 'size.c')
-rw-r--r--size.c 3
1 files changed, 2 insertions, 1 deletions
diff --git a/size.c b/size.c
index 437559f..2907d53 100644
--- a/size.c
+++ b/size.c
@@ -20,6 +20,7 @@
#include <lightning.h>
#include <lightning/jit_private.h>
#include <stdio.h>
+#include "lib/jit_names.c"
jit_int16_t _szs[jit_code_last_code + 1];
@@ -69,7 +70,7 @@ main(int argc, char *argv[])
#endif
fprintf(fp, "#define JIT_INSTR_MAX %d\n", max);
for (offset = 0; offset <= jit_code_last_code; offset++)
- fprintf(fp, " %d,\n", _szs[offset]);
+ fprintf(fp, " %d, /* %s */\n", _szs[offset], code_name[offset]);
#if defined(__arm__)
fprintf(fp, "#endif /* __ARM_PCS_VFP */\n");
#elif defined(__mips__)
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 00:11:00 +0000

AltStyle によって変換されたページ (->オリジナル) /