Chromium Code Reviews| Index: src/trusted/validator_mips/validator_tests.cc |
| diff --git a/src/trusted/validator_mips/validator_tests.cc b/src/trusted/validator_mips/validator_tests.cc |
| index 6eed457579c0ab518f9302bdab823c26bf31fc48..6fd3fa855929b908132551ebc03781d1cb587b9b 100644 |
| --- a/src/trusted/validator_mips/validator_tests.cc |
| +++ b/src/trusted/validator_mips/validator_tests.cc |
| @@ -45,7 +45,7 @@ using nacl_mips_val::ProblemSink; |
| using nacl_mips_val::CodeSegment; |
| using nacl_mips_dec::kInstrSize; |
| using nacl_mips_dec::kNop; |
| -using nacl_mips_dec::kRegisterStack; |
| +using nacl_mips_dec::kRegListDataAddr; |
| using nacl_mips_dec::kRegListReserved; |
| namespace { |
| @@ -145,19 +145,21 @@ class ValidatorTests : public ::testing::Test { |
| TEST_F(ValidatorTests, RecognizesDataAddressRegisters) { |
| /* |
| * Note that the logic below needs to be kept in sync with the definition |
| - * of kAbiDataAddrRegisters at the top of this file. |
| + * of kRegListDataAddr at the top of this file. |
|
Mark Seaborn
2013/01/15 16:51:36
Update comment? kRegListDataAddr isn't defined at
petarj
2013/01/22 22:57:30
Done.
|
| * |
| * This test is pretty trivial -- we can exercise the data_address_register |
| * functionality more deeply with pattern tests below. |
| */ |
| for (int i = 0; i < 31; i++) { |
| Register reg(i); |
| - if (reg.Equals(nacl_mips_dec::kRegisterStack)) { |
| + if (reg.Equals(nacl_mips_dec::kRegisterStack) |
| + || reg.Equals(nacl_mips_dec::kRegisterTls)) { |
| EXPECT_TRUE(_validator.IsDataAddressRegister(reg)) |
| - << "Stack pointer must be a data address register."; |
| + << "Stack pointer and TLS register must be data address registers."; |
| } else { |
| EXPECT_FALSE(_validator.IsDataAddressRegister(reg)) |
| - << "Only the stack pointer must be a data address register."; |
| + << "Only the stack pointer and TLS register are data " |
| + "address registers."; |
| } |
| } |
| } |
| @@ -405,7 +407,7 @@ ValidatorTests::ValidatorTests() |
| kCodeRegionSize, |
| kDataRegionSize, |
| kRegListReserved, |
| - RegisterList(kRegisterStack)) {} |
| + kRegListDataAddr) {} |
| bool ValidatorTests::Validate(const mips_inst *pattern, |
| size_t inst_count, |