Index: test/cctest/test-cpu.cc |
diff --git a/test/mjsunit/regress/regress-2593.js b/test/cctest/test-cpu.cc |
similarity index 75% |
copy from test/mjsunit/regress/regress-2593.js |
copy to test/cctest/test-cpu.cc |
index b51b41c27e65d8f6344f3cc22f9fec2c5a99b92d..1c61ab1c46fd151068caa40bdae559f7332efcb1 100644 |
--- a/test/mjsunit/regress/regress-2593.js |
+++ b/test/cctest/test-cpu.cc |
@@ -25,37 +25,26 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --expose_gc |
+#include "v8.h" |
-p1 = { }; |
-p2 = { }; |
-p3 = { x : 1 }; |
-p2.__proto__ = p3 |
-p1.__proto__ = p2 |
+#include "cctest.h" |
+#include "cpu.h" |
-// Normalize p1. |
-p1.z = 1 |
-delete p1.z |
+using namespace v8::internal; |
-// Make sure all objects are in old space. |
-for (var i = 0; i < 10; i++) gc(); |
-function f2() { |
- p2.x; |
-} |
- |
-function f1() { |
- return p1.x; |
-} |
- |
-// Create load stub in p2. |
-for (var i = 0; i < 10; i++) f2(); |
+TEST(FeatureImplications) { |
+ // Test for features implied by other features. |
+ CPU cpu; |
-// Create load stub in p2 for p1. |
-for (var i = 0; i < 10; i++) f1(); |
+ // ia32 and x64 features |
+ CHECK(!cpu.has_sse() || cpu.has_mmx()); |
+ CHECK(!cpu.has_sse2() || cpu.has_sse()); |
+ CHECK(!cpu.has_sse3() || cpu.has_sse2()); |
+ CHECK(!cpu.has_ssse3() || cpu.has_sse3()); |
+ CHECK(!cpu.has_sse41() || cpu.has_sse3()); |
+ CHECK(!cpu.has_sse42() || cpu.has_sse41()); |
-assertEquals(1, f1()); |
- |
-p2.x = 2; |
- |
-assertEquals(2, f1()); |
+ // arm features |
+ CHECK(!cpu.has_vfp3_d32() || cpu.has_vfp3()); |
+} |