Index: src/sh4/map-sh4.h |
diff --git a/test/mjsunit/this.js b/src/sh4/map-sh4.h |
similarity index 69% |
copy from test/mjsunit/this.js |
copy to src/sh4/map-sh4.h |
index 890dea4f25394a8a5d2370dbb6d0832c4bcf2916..0faaa234235f495c69e8ae343b5e0da297452b97 100644 |
--- a/test/mjsunit/this.js |
+++ b/src/sh4/map-sh4.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2008 the V8 project authors. All rights reserved. |
+// Copyright 2011-2012 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -25,22 +25,33 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-function f() { return this; } |
- |
-assertFalse(this == null); // the global object shouldn't be null or undefined |
-assertEquals('[object global]', String(this)); |
- |
-assertTrue(this === this); |
-assertTrue(this === (function() { return this; })()); |
-assertTrue(this === f()); |
- |
-var x = {}, y = {}; |
-x.f = y.f = f; |
-assertFalse(x === f()); |
-assertFalse(y === f()); |
-assertTrue(x === x.f()); |
-assertTrue(x === x[new String('f')]()); |
-assertTrue(y === y.f(), "y.f()"); |
-assertTrue(y === y[new String('f')]()); |
-assertFalse(x === y.f()); |
-assertFalse(y === x.f()); |
+// Mapping of ARM registers to SH4 registers. |
+// Include this file the first time for defining the mapping. |
+// Include this file a second time for undefining it. |
+#ifndef MAP_SH4 |
+// First include, we define the mapping |
+#define MAP_SH4 |
+#define r8 "should be cp" |
+#define ip sh4_r10 |
+#define lr pr |
+#define pc "to be checked" |
+#define r10 "should be roots" |
+#define r11 "Unexpected" |
+#define r12 "Unexpected" |
+#define r13 "Unexpected" |
+#define r14 "Unexpected" |
+#define r15 "Unexpected" |
+#else |
+// Second include, we define the mapping |
+#undef MAP_SH4 |
+#undef r8 |
+#undef ip |
+#undef lr |
+#undef pc |
+#undef r10 |
+#undef r11 |
+#undef r12 |
+#undef r13 |
+#undef r14 |
+#undef r15 |
+#endif |