Home | History | Annotate | Download | only in src

Lines Matching refs:opcode

44                                 int opcode) {
45 g_exercise_code_table_->inst1[opcode] = inst1;
46 g_exercise_code_table_->mode1[opcode] = mode1;
47 g_exercise_code_table_->size1[opcode] = (inst1 == VCD_NOOP) ? 0 : size1;
48 g_exercise_code_table_->inst2[opcode] = inst2;
49 g_exercise_code_table_->mode2[opcode] = mode2;
50 g_exercise_code_table_->size2[opcode] = (inst2 == VCD_NOOP) ? 0 : size2;
55 int opcode = 0;
74 AddExerciseOpcode(inst1, mode1, 0, inst2, mode2, 0, opcode++);
75 AddExerciseOpcode(inst1, mode1, 0, inst2, mode2, 255, opcode++);
76 AddExerciseOpcode(inst1, mode1, 255, inst2, mode2, 0, opcode++);
77 AddExerciseOpcode(inst1, mode1, 255, inst2, mode2, 255, opcode++);
82 CHECK_EQ(VCDiffCodeTableData::kCodeTableSize, opcode);
92 void VerifyInstruction(unsigned char opcode,
96 EXPECT_EQ(inst, code_table_data_.inst1[opcode]);
97 EXPECT_EQ(size, code_table_data_.size1[opcode]);
98 EXPECT_EQ(mode, code_table_data_.mode1[opcode]);
99 EXPECT_EQ(VCD_NOOP, code_table_data_.inst2[opcode]);
100 EXPECT_EQ(0, code_table_data_.size2[opcode]);
101 EXPECT_EQ(0, code_table_data_.mode2[opcode]);
111 // squared (because there are two instructions per opcode), makes
131 // All possible combinations of inst and mode should have an opcode with size 0.
133 VerifyInstruction(/* opcode */ 131, VCD_COPY, /* size */ 0, /* mode */ 7);
135 // Now there is no opcode expressing COPY with mode 7 and size 0.
140 VerifyInstruction(/* opcode */ 1, VCD_ADD, /* size */ 0, /* mode */ 0);
142 // Now there is no opcode expressing ADD with size 0.
147 VerifyInstruction(/* opcode */ 0, VCD_RUN, /* size */ 0, /* mode */ 0);
149 // Now there is no opcode expressing RUN with size 0.
154 VerifyInstruction(/* opcode */ 0, VCD_RUN, /* size */ 0, /* mode */ 0);
162 VerifyInstruction(/* opcode */ 131, VCD_COPY, /* size */ 0, /* mode */ 7);
170 VerifyInstruction(/* opcode */ 1, VCD_ADD, /* size */ 0, /* mode */ 0);
176 VerifyInstruction(/* opcode */ 0, VCD_RUN, /* size */ 0, /* mode */ 0);
182 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
192 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
202 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
210 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
220 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
228 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
236 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);
243 VerifyInstruction(/* opcode */ 20, VCD_COPY, /* size */ 4, /* mode */ 0);