| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The Native Client Authors. All rights reserved. | 2 * Copyright 2016 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "gtest/gtest.h" | 9 #include "gtest/gtest.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 static const TestCode t_ ## template_name = { \ | 31 static const TestCode t_ ## template_name = { \ |
| 32 template_name, \ | 32 template_name, \ |
| 33 template_name ## _end, \ | 33 template_name ## _end, \ |
| 34 template_name ## _post_rewrite, \ | 34 template_name ## _post_rewrite, \ |
| 35 template_name ## _post_rewrite_end, \ | 35 template_name ## _post_rewrite_end, \ |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 DECLARE_TEMPLATE(no_rewrite_code) | 38 DECLARE_TEMPLATE(no_rewrite_code) |
| 39 #if NACL_BUILD_SUBARCH == 32 | 39 #if NACL_BUILD_SUBARCH == 32 |
| 40 DECLARE_TEMPLATE(movntq_code) | 40 DECLARE_TEMPLATE(movntq_code) |
| 41 DECLARE_TEMPLATE(movntps_code) |
| 41 DECLARE_TEMPLATE(movntdq_code) | 42 DECLARE_TEMPLATE(movntdq_code) |
| 42 DECLARE_TEMPLATE(prefetchnta_code) | 43 DECLARE_TEMPLATE(prefetchnta_code) |
| 43 #else | 44 #else |
| 44 DECLARE_TEMPLATE(off_webstore_movnt_code) | 45 DECLARE_TEMPLATE(off_webstore_movnt_code) |
| 45 DECLARE_TEMPLATE(prefetchnta_code) | 46 DECLARE_TEMPLATE(prefetchnta_code) |
| 46 DECLARE_TEMPLATE(prefetchnta_rip_relative_code) | 47 DECLARE_TEMPLATE(prefetchnta_rip_relative_code) |
| 47 DECLARE_TEMPLATE(movntq_code) | 48 DECLARE_TEMPLATE(movntq_code) |
| 48 DECLARE_TEMPLATE(movntps_code) | 49 DECLARE_TEMPLATE(movntps_code) |
| 49 DECLARE_TEMPLATE(movnti_code) | 50 DECLARE_TEMPLATE(movnti_code) |
| 50 DECLARE_TEMPLATE(movnti_code2) | 51 DECLARE_TEMPLATE(movnti_code2) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 TestTemplate(&t_no_rewrite_code, NACL_DISABLE_NONTEMPORALS_X86, | 108 TestTemplate(&t_no_rewrite_code, NACL_DISABLE_NONTEMPORALS_X86, |
| 108 NaClValidationFailed); | 109 NaClValidationFailed); |
| 109 } | 110 } |
| 110 | 111 |
| 111 #if NACL_BUILD_SUBARCH == 32 | 112 #if NACL_BUILD_SUBARCH == 32 |
| 112 | 113 |
| 113 TEST_F(ValidationMovntRewriteTests, RewriteMovntq) { | 114 TEST_F(ValidationMovntRewriteTests, RewriteMovntq) { |
| 114 TestRewrite(&t_movntq_code); | 115 TestRewrite(&t_movntq_code); |
| 115 } | 116 } |
| 116 | 117 |
| 118 TEST_F(ValidationMovntRewriteTests, RewriteMovntps) { |
| 119 TestRewrite(&t_movntps_code); |
| 120 } |
| 121 |
| 117 TEST_F(ValidationMovntRewriteTests, RewriteMovntdq) { | 122 TEST_F(ValidationMovntRewriteTests, RewriteMovntdq) { |
| 118 TestRewrite(&t_movntdq_code); | 123 TestRewrite(&t_movntdq_code); |
| 119 } | 124 } |
| 120 | 125 |
| 121 TEST_F(ValidationMovntRewriteTests, RewritePrefetchnta) { | 126 TEST_F(ValidationMovntRewriteTests, RewritePrefetchnta) { |
| 122 TestRewrite(&t_prefetchnta_code); | 127 TestRewrite(&t_prefetchnta_code); |
| 123 } | 128 } |
| 124 | 129 |
| 125 #else | 130 #else |
| 126 | 131 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 TestRewrite(&t_last_movnti_cross_bundle_by_one); | 184 TestRewrite(&t_last_movnti_cross_bundle_by_one); |
| 180 } | 185 } |
| 181 | 186 |
| 182 #endif | 187 #endif |
| 183 | 188 |
| 184 int main(int argc, char *argv[]) { | 189 int main(int argc, char *argv[]) { |
| 185 NaClLogModuleInit(); | 190 NaClLogModuleInit(); |
| 186 testing::InitGoogleTest(&argc, argv); | 191 testing::InitGoogleTest(&argc, argv); |
| 187 return RUN_ALL_TESTS(); | 192 return RUN_ALL_TESTS(); |
| 188 } | 193 } |
| OLD | NEW |