+
+ /* Walk over all nodes */
+ for (I = 0; I < CollCount (Nodes); ++I) {
+
+ /* Get the next case node */
+ CaseNode* N = CollAtUnchecked (Nodes, I);
+
+ /* If we have a next label, define it */
+ if (NextLabel) {
+ g_defcodelabel (NextLabel);
+ NextLabel = 0;
+ }
+
+ /* Do the compare */
+ AddCodeLine (Compare, CN_GetValue (N));
+
+ /* If this is the last level, jump directly to the case code if found */
+ if (Depth == 1) {
+
+ /* Branch if equal */
+ g_falsejump (0, CN_GetLabel (N));
+
+ } else {
+
+ /* Determine the next label */
+ if (I == CollCount (Nodes) - 1) {
+ /* Last node means not found */
+ g_truejump (0, DefaultLabel);
+ } else {
+ /* Jump to the next check */
+ NextLabel = GetLocalLabel ();
+ g_truejump (0, NextLabel);
+ }
+
+ /* Check the next level */
+ g_switch (N->Nodes, DefaultLabel, Depth-1);
+
+ }
+ }
+
+ /* If we go here, we haven't found the label */
+ g_jump (DefaultLabel);
+}
+
+
+
+/*****************************************************************************/
+/* User supplied assembler code */
+/*****************************************************************************/
+
+
+
+void g_asmcode (struct StrBuf* B)
+/* Output one line of assembler code. */
+{
+ AddCodeLine ("%.*s", SB_GetLen (B), SB_GetConstBuf (B));