From ad653dc71761a155267581d4ae01456e297558bc Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 12 Jul 2001 11:42:48 +0000 Subject: [PATCH] * ambiguous insn sim decode fix 2001-07-12 Frank Ch. Eigler * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo. (mask-superset?): Look for strict supersets to allow rejection of duplicate insns. --- ChangeLog | 6 ++++++ insn.scm | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66f2ece..52ea0d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-07-12 Frank Ch. Eigler + + * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo. + (mask-superset?): Look for strict supersets to allow rejection of + duplicate insns. + 2001-07-11 Frank Ch. Eigler * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE... diff --git a/insn.scm b/insn.scm index f5eab15..bef0995 100644 --- a/insn.scm +++ b/insn.scm @@ -729,22 +729,25 @@ (keep? (not superset-insn))) (if (not keep?) (logit 2 - "Instruction " (obj:name insn) "ambiguity-filtered by " + "Instruction " (obj:name insn) " ambiguity-filtered by " (obj:name superset-insn) "\n")) keep?)) insn-list) ) -; Helper function for above: does (m1,v1) match a superset of (m2,v2) ? +; Helper function for above: does (m1,v1) match a STRICT superset of (m2,v2) ? ; ; eg> mask-superset? #b1100 #b1000 #b1110 #b1010 -> #t ; eg> mask-superset? #b1100 #b1000 #b1010 #b1010 -> #f ; eg> mask-superset? #b1100 #b1000 #b1110 #b1100 -> #f +; eg> mask-superset? #b1100 #b1000 #b1100 #b1000 -> #f +; (define (mask-superset? m1 v1 m2 v2) (let ((result (and (= (cg-logand m1 m2) m1) - (= (cg-logand m1 v1) (cg-logand m1 v2))))) + (= (cg-logand m1 v1) (cg-logand m1 v2)) + (not (and (= m1 m2) (= v1 v2)))))) (if result (logit 4 "(" (number->string m1 16) "," (number->string v1 16) ")" " contains " -- 2.43.5