From 68d7d1014113a73e613b9a4441097073b3186de6 Mon Sep 17 00:00:00 2001 From: Mark Charney Date: Wed, 5 Jul 2017 18:02:38 -0400 Subject: [PATCH] ild_codegen.py: remove bogus asserts that come up for #UD on disp/mode * ild should not assert. * lengths of (unnamed) #UDs are not architectural and are subject to change by implementation, although they infrequently change. * the code was attempting to catch a case where information was missing (about the lengths of displacments) but if information is missing, the corresponding encodings are not defined. Change-Id: Ieb30c380ae6117567fa1a72dd0adbd7f0e3b2791 (cherry picked from commit 80173f59809456b8406b573a435d1b00c56efef1) --- pysrc/ild_codegen.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pysrc/ild_codegen.py b/pysrc/ild_codegen.py index 148ae35..37a595c 100755 --- a/pysrc/ild_codegen.py +++ b/pysrc/ild_codegen.py @@ -523,8 +523,6 @@ def gen_l1_byreg_resolution_function(agi,info_list, nt_dict, is_conflict_fun, else: _add_switch_dispatching(fo, fun_dict, reg_var, data_name) - fo.add_code("/*We should not ever get here*/") - fo.add_code_eol('xed_assert(0)') return fo def _add_int_dict_dispatching(fo, int_dict, dispatch_var, data_name): @@ -553,12 +551,9 @@ def _add_switch_dispatching(fo, fun_dict, dispatch_var, data_name): fo.add_code('case %s:' % key) call_stmt = '%s(%s)' % (fun_dict[key], data_name) fo.add_code_eol(call_stmt) - fo.add_code_eol('return') - fo.add_code("/*We should not ever get here*/") - fo.add_code("/*If we got here, it means that we need" ) - fo.add_code("to fill ild_storage entries for those MODE") - fo.add_code(" values that led us here*/") - fo.add_code_eol('default: xed_assert(0)') + fo.add_code_eol('break') + fo.add_code("/*We should only get here for #UDs and those have no defined architectural length*/") + fo.add_code_eol('default: ') fo.add_code("}") def gen_l1_bymode_resolution_function(agi,info_list, nt_dict, is_conflict_fun, @@ -620,8 +615,6 @@ def gen_l1_bymode_resolution_function(agi,info_list, nt_dict, is_conflict_fun, else: _add_switch_dispatching(fo, fun_dict, mode_var, data_name) - fo.add_code("/*We should not ever get here*/") - fo.add_code_eol('xed_assert(0)') return fo def print_defines(file, define_dict):