3 * turns a list of x86 insns into the assembly code to generate them
4 * Author: Chris Lu <czl@andrew.cmu.edu>
9 type asm = x86.insn list
10 val stringify : (string -> string) -> asm -> string
13 structure Stringify :> STRINGIFY =
15 type asm = x86.insn list
18 (* val stringify : asm -> string
19 * turns a x86 instruction list into a string of assembly code for these instructions *)
21 fun stringify' rn (X.CALL (l, n)) = X.prettyprint X.Long (X.CALL ((Symbol.symbol (rn (Symbol.name l))), n))
22 | stringify' rn x = X.prettyprint X.Long x
24 (* val stringify : asm -> string *)
25 fun stringify realname l = foldr (fn (a,b) => (stringify' realname a) ^ b) ("") l