--- gforth/prims2x.fs 2004/01/20 19:07:41 1.149 +++ gforth/prims2x.fs 2005/01/22 22:16:59 1.153 @@ -1,6 +1,6 @@ \ converts primitives to, e.g., C code -\ Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,1998,2000,2003,2004 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -913,7 +913,9 @@ variable tail-nextp2 \ xt to execute for : output-label2 ( -- ) ." LABEL2(" prim prim-c-name 2@ type ." )" cr - ." NEXT_P2;" cr ; + ." NEXT_P1_5;" cr + ." LABEL3(" prim prim-c-name 2@ type ." )" cr + ." DO_GOTO;" cr ; : output-c-tail1 { xt -- } \ the final part of the generated C code, with xt printing LABEL2 or not. @@ -1567,7 +1569,9 @@ variable offset-super2 0 offset-super2 rot 2 .r ." ," swap 2 .r ." ," 2 .r ." , " prim prim-branch? negate . ." ," state-in state-number @ 2 .r ." ," - state-out state-number @ 2 .r ." ," ; + state-out state-number @ 2 .r ." ," + inst-stream stack-in @ 1 .r ." ," +; : output-costs-gforth-simple ( -- ) output-costs-prefix @@ -1583,14 +1587,15 @@ variable offset-super2 0 offset-super2 output-name-comment cr ; -: output-costs ( -- ) - \ description of superinstructions and simple instructions - ." {" prim compute-costs - rot 2 .r ." ," swap 2 .r ." ," 2 .r ." ," - offset-super2 @ 5 .r ." ," - super2-length dup 2 .r ." }," offset-super2 +! - output-name-comment - cr ; +\ : output-costs ( -- ) +\ \ description of superinstructions and simple instructions +\ ." {" prim compute-costs +\ rot 2 .r ." ," swap 2 .r ." ," 2 .r ." ," +\ offset-super2 @ 5 .r ." ," +\ super2-length dup 2 .r ." ," offset-super2 +! +\ inst-stream stack-in @ 1 .r ." }," +\ output-name-comment +\ cr ; : output-super2-simple ( -- ) prim prim-c-name 2@ prim prim-c-name-orig 2@ d= if