Closed hangingman closed 1 year ago
https://github.com/astocko/json-x86-64
https://github.com/mattbierner/Template-Assembly
Limitations This project is for demonstration purposes and only supports a super limited subset of x86 assembly. Many instructions are currently not available and many assembly language features are missing or broken.
Many instructions are currently not available とは書かれているが https://github.com/mattbierner/Template-Assembly/blob/master/include/tasm/isa/x86.h をgrepすると223個はサポートされていそうに見える。手直ししたら使えそうな気はする。
Many instructions are currently not available
$ cat x86.h | grep auto | sed -e 's/(.*$//g' -e 's/constexpr auto //g' | sed -e 's/^[[:blank:]]*//' | uniq | wc -l 223
bnfcで構文解析後のデータをある程度自動でTemplate-Assemblyに渡せば、コードを書く量を減らせそうな気がしている。 (そもそもosaskをビルドするのにフル実装のアセンブリ実装は不要な気もするけど)
2023/02/14
x86-64のJSON https://github.com/astocko/json-x86-64
をobj化し https://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967 https://github.com/graphitemaster/incbin
この形式でconstexpr化, struct化できる https://github.com/jorgen/json_struct/blob/4f6d60c1c90aa55110c46342487d64615790ce8a/tests/json-struct-nested.cpp#L27-L44
https://github.com/astocko/json-x86-64
https://github.com/mattbierner/Template-Assembly
Many instructions are currently not available
とは書かれているが https://github.com/mattbierner/Template-Assembly/blob/master/include/tasm/isa/x86.h をgrepすると223個はサポートされていそうに見える。手直ししたら使えそうな気はする。bnfcで構文解析後のデータをある程度自動でTemplate-Assemblyに渡せば、コードを書く量を減らせそうな気がしている。 (そもそもosaskをビルドするのにフル実装のアセンブリ実装は不要な気もするけど)
2023/02/14
x86-64のJSON https://github.com/astocko/json-x86-64
をobj化し https://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967 https://github.com/graphitemaster/incbin
この形式でconstexpr化, struct化できる https://github.com/jorgen/json_struct/blob/4f6d60c1c90aa55110c46342487d64615790ce8a/tests/json-struct-nested.cpp#L27-L44