From eee09a56076f40beabea1f9f677d7d6463265bb0 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 27 Sep 2020 22:05:11 -0700 Subject: 6887 subx.md distinguishes between operands and arguments. Let's use that terminology more consistently in the sources. --- 034check_operand_bounds.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '034check_operand_bounds.cc') diff --git a/034check_operand_bounds.cc b/034check_operand_bounds.cc index 72a66e3f..efc3385e 100644 --- a/034check_operand_bounds.cc +++ b/034check_operand_bounds.cc @@ -1,4 +1,4 @@ -//:: Check that the different operands of an instruction aren't too large for their bitfields. +//:: Check that the different arguments of an instruction aren't too large for their bitfields. void test_check_bitfield_sizes() { Hide_errors = true; @@ -28,22 +28,22 @@ put_new(Operand_bound, "imm8", 1<<8); // no bound needed for imm32 :(before "Pack Operands(segment code)") -check_operand_bounds(code); +check_argument_bounds(code); if (trace_contains_errors()) return; :(code) -void check_operand_bounds(const segment& code) { - trace(3, "transform") << "-- check operand bounds" << end(); +void check_argument_bounds(const segment& code) { + trace(3, "transform") << "-- check argument bounds" << end(); for (int i = 0; i < SIZE(code.lines); ++i) { const line& inst = code.lines.at(i); - for (int j = first_operand(inst); j < SIZE(inst.words); ++j) - check_operand_bounds(inst.words.at(j)); + for (int j = first_argument(inst); j < SIZE(inst.words); ++j) + check_argument_bounds(inst.words.at(j)); if (trace_contains_errors()) return; // stop at the first mal-formed instruction } } -void check_operand_bounds(const word& w) { +void check_argument_bounds(const word& w) { for (map::iterator p = Operand_bound.begin(); p != Operand_bound.end(); ++p) { - if (!has_operand_metadata(w, p->first)) continue; + if (!has_argument_metadata(w, p->first)) continue; if (!looks_like_hex_int(w.data)) continue; // later transforms are on their own to do their own bounds checking int32_t x = parse_int(w.data); if (x >= 0) { -- cgit 1.4.1-2-gfad0