Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Spell of Mastery Progress

Name: Anonymous 2020-09-17 20:05

Ok. The new voxel rendering algorithm performs 1.4 times faster. Not much, but voxel models can also be split into 16-bit chunks, which locally use only 16-bit addressing. That should speedup the algorithm further, if the bottleneck is with the memory bandwidth.

I've also discovered that GCC's __builtin_popcount is slower than a lookup table, since it branches into subroutine __popcountdi2. Why GCC doesnt use the x86 popcnt opcode? No idea. No idea. But it probably would be easier to answer why Stallman molests little children.

Name: Anonymous 2020-09-23 21:58

Ok. Parsing C in C was a bit more involved than I expected, even despite I flatten most of the expression and statement stuff. C syntax is not easy, but still a far cry from the nightmarish C++ syntax. GCC also adds a lot of its own special constructs, which break parser. The task would have been a lot easier with Symta or Lisp, but I want to do it with just YACC, since I will probably reuse the code in the Symta runtime, which can't use the Symta itself.

What I need is determining the type of the struct fields, then patching the accesses right before passing it to the actual C compiler.

Here is the list of node types I found unavoidable:
D(N_VOID),
D(N_BLOCK),
D(N_CAST),
D(N_CALL),
D(N_DECL),
D(N_DECLARATOR),
D(N_DOT),
D(N_EXPR),
D(N_FN),
D(N_LIT),
D(N_PARAM),
D(N_PARAM_LIST),
D(N_STRUCT),
D(N_STRUCT_DECL),
D(N_STRUCT_FIELD),
D(N_TOP),
D(N_TYPE),
D(N_TYPENAME),
D(N_TYPE_ALIGN),
D(N_TYPE_FUNC),
D(N_TYPE_QUAL),
D(N_TYPE_SPEC),
D(N_TYPE_STOR),
D(N_VARS),
D(N_VAR_DEF),
D(N_END)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List