Index: test/cctest/test-cpu-ia32.cc |
diff --git a/test/mjsunit/regress/regress-2671-1.js b/test/cctest/test-cpu-ia32.cc |
similarity index 87% |
copy from test/mjsunit/regress/regress-2671-1.js |
copy to test/cctest/test-cpu-ia32.cc |
index 042a501e5adb86cd7d868ec721edef8edde27274..245450bf92b595e417a53edff09a5849d74dd135 100644 |
--- a/test/mjsunit/regress/regress-2671-1.js |
+++ b/test/cctest/test-cpu-ia32.cc |
@@ -25,21 +25,16 @@ |
// (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: --allow-natives-syntax |
+#include "v8.h" |
-var y; |
-function f() { |
- var a = []; |
- a[20] = 0; |
- y = 3; |
- var i = 7 * (y + -0); |
- a[i]++; |
- assertTrue(isNaN(a[i])); |
-} |
+#include "cctest.h" |
+#include "cpu.h" |
+ |
+using namespace v8::internal; |
-f(); |
-f(); |
-f(); |
-%OptimizeFunctionOnNextCall(f); |
-f(); |
+TEST(RequiredFeaturesX64) { |
+ // Test for the features required by every x86 CPU in compat/legacy mode. |
+ CPU cpu; |
+ CHECK(cpu.has_sahf()); |
+} |