From 2e05f2eb0f73a752c65cd1a17a7467d8bc2c348c Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Tue, 9 May 2006 18:07:51 +0000 Subject: [PATCH] 2006-05-09 Dave Brolley * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set abuf->written if profiling. --- ChangeLog | 2 ++ sid-cpu.scm | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b07d1e..c72cdbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-05-09 Dave Brolley + * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set + abuf->written if profiling. * read.scm (include): Use arch-path as file location. (arch-path): Define it with a default setting. (-cgen): Update arch-path when "-a" option is specified. diff --git a/sid-cpu.scm b/sid-cpu.scm index 977af27..ed53c0d 100644 --- a/sid-cpu.scm +++ b/sid-cpu.scm @@ -1,5 +1,5 @@ ; CPU family related simulator generator, excluding decoding and model support. -; Copyright (C) 2000, 2002, 2003, 2005 Red Hat, Inc. +; Copyright (C) 2000, 2002, 2003, 2005, 2006 Red Hat, Inc. ; This file is part of CGEN. ; *********** @@ -748,6 +748,14 @@ using namespace cgen; "\n" (gen-semantic-code insn) "\n" + ; Only update what's been written if some are conditionally written. + ; Otherwise we know they're all written so there's no point in + ; keeping track. + (if (or (with-profile?) (with-parallel-write?)) + (if (-any-cond-written? (insn-sfmt insn)) + " abuf->written = written;\n" + "") + "") (if cti? " current_cpu->done_cti_insn (npc, status);\n" " current_cpu->done_insn (npc, status);\n") -- 2.43.5