diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-09-27 22:05:11 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-09-27 22:05:11 -0700 |
commit | eee09a56076f40beabea1f9f677d7d6463265bb0 (patch) | |
tree | c3bc8d12e48b671d36f31befb5ea9e07486f13d0 /034check_operand_bounds.cc | |
parent | f068bda98e0218df6b551a6cd8e5520255866308 (diff) | |
download | mu-eee09a56076f40beabea1f9f677d7d6463265bb0.tar.gz |
6887
subx.md distinguishes between operands and arguments. Let's use that terminology more consistently in the sources.
Diffstat (limited to '034check_operand_bounds.cc')
-rw-r--r-- | 034check_operand_bounds.cc | 16 |
1 files changed, 8 insertions, 8 deletions
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<string, uint32_t>::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) { |