summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/register_state_check.h
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/test/register_state_check.h
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/test/register_state_check.h')
-rw-r--r--third_party/aom/test/register_state_check.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/third_party/aom/test/register_state_check.h b/third_party/aom/test/register_state_check.h
index 330820173..cce662a6d 100644
--- a/third_party/aom/test/register_state_check.h
+++ b/third_party/aom/test/register_state_check.h
@@ -49,7 +49,7 @@ namespace libaom_test {
class RegisterStateCheck {
public:
RegisterStateCheck() { initialized_ = StoreRegisters(&pre_context_); }
- ~RegisterStateCheck() { EXPECT_TRUE(Check()); }
+ ~RegisterStateCheck() { Check(); }
private:
static bool StoreRegisters(CONTEXT *const context) {
@@ -62,10 +62,10 @@ class RegisterStateCheck {
}
// Compares the register state. Returns true if the states match.
- bool Check() const {
- if (!initialized_) return false;
+ void Check() const {
+ ASSERT_TRUE(initialized_);
CONTEXT post_context;
- if (!StoreRegisters(&post_context)) return false;
+ ASSERT_TRUE(StoreRegisters(&post_context));
const M128A *xmm_pre = &pre_context_.Xmm6;
const M128A *xmm_post = &post_context.Xmm6;
@@ -74,7 +74,6 @@ class RegisterStateCheck {
++xmm_pre;
++xmm_post;
}
- return !testing::Test::HasNonfatalFailure();
}
bool initialized_;
@@ -105,7 +104,7 @@ namespace libaom_test {
class RegisterStateCheck {
public:
RegisterStateCheck() { initialized_ = StoreRegisters(pre_store_); }
- ~RegisterStateCheck() { EXPECT_TRUE(Check()); }
+ ~RegisterStateCheck() { Check(); }
private:
static bool StoreRegisters(int64_t store[8]) {
@@ -114,15 +113,14 @@ class RegisterStateCheck {
}
// Compares the register state. Returns true if the states match.
- bool Check() const {
- if (!initialized_) return false;
+ void Check() const {
+ ASSERT_TRUE(initialized_);
int64_t post_store[8];
aom_push_neon(post_store);
for (int i = 0; i < 8; ++i) {
- EXPECT_EQ(pre_store_[i], post_store[i]) << "d" << i + 8
- << " has been modified";
+ EXPECT_EQ(pre_store_[i], post_store[i])
+ << "d" << i + 8 << " has been modified";
}
- return !testing::Test::HasNonfatalFailure();
}
bool initialized_;
@@ -159,12 +157,12 @@ class RegisterStateCheckMMX {
RegisterStateCheckMMX() {
__asm__ volatile("fstenv %0" : "=rm"(pre_fpu_env_));
}
- ~RegisterStateCheckMMX() { EXPECT_TRUE(Check()); }
+ ~RegisterStateCheckMMX() { Check(); }
private:
// Checks the FPU tag word pre/post execution, returning false if not cleared
// to 0xffff.
- bool Check() const {
+ void Check() const {
EXPECT_EQ(0xffff, pre_fpu_env_[4])
<< "FPU was in an inconsistent state prior to call";
@@ -172,7 +170,6 @@ class RegisterStateCheckMMX {
__asm__ volatile("fstenv %0" : "=rm"(post_fpu_env));
EXPECT_EQ(0xffff, post_fpu_env[4])
<< "FPU was left in an inconsistent state after call";
- return !testing::Test::HasNonfatalFailure();
}
uint16_t pre_fpu_env_[14];