From 2c0e72e7add0f8f45034f77c5e454452e6656430 Mon Sep 17 00:00:00 2001 From: Kavon Farvardin Date: Thu, 20 Sep 2018 13:32:42 -0500 Subject: [PATCH] remove ugly workaround for a bug. filed as issue #7 --- src/tools/mc/driver/main-fn.sml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/tools/mc/driver/main-fn.sml b/src/tools/mc/driver/main-fn.sml index 300c56b52..e9b5bbc4d 100644 --- a/src/tools/mc/driver/main-fn.sml +++ b/src/tools/mc/driver/main-fn.sml @@ -157,15 +157,6 @@ functor MainFn ( else err "error compiling generated assembly code\n" end - (* MLRISC is incorrectly naming some of the 8-bit registers, so as a simple - * workaround, we are just going to find/replace them in the output text file - *) - fun replace8BitRegisters asmFile = let - val cmd = "sed -i \"s/%ah/%spl/g; s/%ch/%bpl/g; s/%dh/%sil/g; s/%bh/%dil/g\" " ^ asmFile - in - ignore (OS.Process.system cmd) - end - fun codegen (verbose, outFile, cfg) = let val outStrm = TextIO.openOut outFile fun doit () = if (Controls.get BasicControl.llvm) @@ -174,10 +165,7 @@ functor MainFn ( in AsmStream.withStream outStrm doit (); TextIO.closeOut outStrm; - if not (Controls.get BasicControl.llvm) - then (replace8BitRegisters outFile) - else (); - buildExe (verbose, outFile) + buildExe (verbose, outFile) end (* compile *) fun runPreproc (dir', cmd, args) = let