Revision: 19325
Author: [email protected]
Date: Wed Feb 12 13:27:13 2014 UTC
Log: Clean up some A64 specific code in common code that was
introduced by A64 merge
- Remove arch specific check macros
- Remove duplicate code in code-stubs.h
- Remove flag check in bootstrap.cc which was introduced for A64 bringup
- Remove A64 specific test message expectations
[email protected], [email protected]
Review URL: https://codereview.chromium.org/134333011
http://code.google.com/p/v8/source/detail?r=19325
Modified:
/branches/bleeding_edge/src/a64/simulator-a64.cc
/branches/bleeding_edge/src/a64/simulator-a64.h
/branches/bleeding_edge/src/bootstrapper.cc
/branches/bleeding_edge/src/checks.h
/branches/bleeding_edge/src/code-stubs.h
/branches/bleeding_edge/test/message/message.status
=======================================
--- /branches/bleeding_edge/src/a64/simulator-a64.cc Wed Feb 12 09:19:30
2014 UTC
+++ /branches/bleeding_edge/src/a64/simulator-a64.cc Wed Feb 12 13:27:13
2014 UTC
@@ -1451,7 +1451,7 @@
// When the base register is SP the stack pointer is required to be
// quadword aligned prior to the address calculation and write-backs.
// Misalignment will cause a stack alignment fault.
- ALIGNMENT_EXCEPTION();
+ FATAL("ALIGNMENT EXCEPTION");
}
if ((addrmode == Offset) || (addrmode == PreIndex)) {
@@ -1480,7 +1480,7 @@
fprintf(stream_, " access was here: 0x%16p\n", address);
fprintf(stream_, " stack limit is here: 0x%16p\n", stack_limit_);
fprintf(stream_, "\n");
- ABORT();
+ FATAL("ACCESS BELOW STACK POINTER");
}
}
@@ -3209,7 +3209,7 @@
bool stack_alignment_exception = ((sp() & 0xf) != 0);
if (stack_alignment_exception) {
TraceSim(" with unaligned stack 0x%016" PRIx64 ".\n", sp());
- ALIGNMENT_EXCEPTION();
+ FATAL("ALIGNMENT EXCEPTION");
}
switch (redirection->type()) {
=======================================
--- /branches/bleeding_edge/src/a64/simulator-a64.h Wed Feb 12 09:19:30
2014 UTC
+++ /branches/bleeding_edge/src/a64/simulator-a64.h Wed Feb 12 13:27:13
2014 UTC
@@ -254,7 +254,9 @@
}
explicit CallArgument(float argument) {
- TODO_UNIMPLEMENTED("CallArgument(float) is untested.");
+ // TODO(all): CallArgument(float) is untested, remove this check once
+ // tested.
+ UNIMPLEMENTED();
// Make the D register a NaN to try to trap errors if the callee
expects a
// double. If it expects a float, the callee should ignore the top
word.
ASSERT(sizeof(kFP64SignallingNaN) == sizeof(bits_));
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Wed Feb 12 09:19:30 2014 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Wed Feb 12 13:27:13 2014 UTC
@@ -2637,10 +2637,8 @@
MakeFunctionInstancePrototypeWritable();
- if (!FLAG_disable_native_files) {
- if (!ConfigureGlobalObjects(global_template)) return;
- isolate->counters()->contexts_created_from_scratch()->Increment();
- }
+ if (!ConfigureGlobalObjects(global_template)) return;
+ isolate->counters()->contexts_created_from_scratch()->Increment();
}
// Initialize experimental globals and install experimental natives.
=======================================
--- /branches/bleeding_edge/src/checks.h Wed Feb 12 09:19:30 2014 UTC
+++ /branches/bleeding_edge/src/checks.h Wed Feb 12 13:27:13 2014 UTC
@@ -34,8 +34,6 @@
extern "C" void V8_Fatal(const char* file, int line, const char*
format, ...);
-// Define custom A64 preprocessor helpers to facilitate development.
-#ifndef V8_TARGET_ARCH_A64
// The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during
// development, but they should not be relied on in the final product.
@@ -54,69 +52,21 @@
#define UNREACHABLE() ((void) 0)
#endif
+// Simulator specific helpers.
+#if defined(USE_SIMULATOR) && defined(V8_TARGET_ARCH_A64)
+ // TODO(all): If possible automatically prepend an indicator like
+ // UNIMPLEMENTED or LOCATION.
+ #define
ASM_UNIMPLEMENTED(message) \
+ __ Debug(message, __LINE__, NO_PARAM)
+ #define
ASM_UNIMPLEMENTED_BREAK(message) \
+ __ Debug(message,
__LINE__, \
+ FLAG_ignore_asm_unimplemented_break ? NO_PARAM : BREAK)
+ #define
ASM_LOCATION(message) \
+ __ Debug("LOCATION: " message, __LINE__, NO_PARAM)
#else
-
- #ifdef DEBUG
- #define
FATAL(msg) \
- V8_Fatal(__FILE__, __LINE__, "%s", (msg))
- #define
UNREACHABLE() \
- V8_Fatal(__FILE__, __LINE__, "unreachable code")
- #else
- #define
FATAL(msg) \
- V8_Fatal("", 0, "%s", (msg))
- #define UNREACHABLE() ((void) 0)
- #endif
-
- #define ABORT() printf("in %s, line %i, %s", __FILE__, __LINE__,
__func__); \
- abort()
-
- #define ALIGNMENT_EXCEPTION() printf("ALIGNMENT EXCEPTION\t"); ABORT()
-
- // Helpers for unimplemented sections.
- #define
UNIMPLEMENTED() \
- do
{ \
- printf("UNIMPLEMENTED: %s,
line %d, %s\n", \
- __FILE__, __LINE__,
__func__); \
- V8_Fatal(__FILE__, __LINE__, "unimplemented
code"); \
- } while (0)
- #define
UNIMPLEMENTED_M(message) \
- do
{ \
- printf("UNIMPLEMENTED: %s,
line %d, %s : %s\n", \
- __FILE__, __LINE__, __func__,
message); \
- V8_Fatal(__FILE__, __LINE__, "unimplemented
code"); \
- } while (0)
- // Like UNIMPLEMENTED, but does not abort.
- #define
TODO_UNIMPLEMENTED(message) \
- do
{ \
- static const unsigned int kLimit =
1; \
- static unsigned int printed =
0; \
- if (printed < UINT_MAX)
{ \
-
printed++; \
-
} \
- if (printed <= kLimit)
{ \
- printf("UNIMPLEMENTED: %s,
line %d, %s: %s\n", \
- __FILE__, __LINE__, __func__,
message); \
-
} \
- } while (0)
-
- // Simulator specific helpers.
- #ifdef USE_SIMULATOR
- // Helpers for unimplemented sections.
- // TODO(all): If possible automatically prepend an indicator like
- // UNIMPLEMENTED or LOCATION.
- #define
ASM_UNIMPLEMENTED(message) \
- __ Debug(message, __LINE__, NO_PARAM)
- #define
ASM_UNIMPLEMENTED_BREAK(message) \
- __ Debug(message,
__LINE__, \
- FLAG_ignore_asm_unimplemented_break ? NO_PARAM : BREAK)
- #define
ASM_LOCATION(message) \
- __ Debug("LOCATION: " message, __LINE__, NO_PARAM)
- #else
- #define ASM_UNIMPLEMENTED(message)
- #define ASM_UNIMPLEMENTED_BREAK(message)
- #define ASM_LOCATION(message)
- #endif
-
+ #define ASM_UNIMPLEMENTED(message)
+ #define ASM_UNIMPLEMENTED_BREAK(message)
+ #define ASM_LOCATION(message)
#endif
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Wed Feb 12 09:19:30 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.h Wed Feb 12 13:27:13 2014 UTC
@@ -101,13 +101,7 @@
V(KeyedLoadField)
// List of code stubs only used on ARM platforms.
-#if V8_TARGET_ARCH_ARM
-#define CODE_STUB_LIST_ARM(V) \
- V(GetProperty) \
- V(SetProperty) \
- V(InvokeBuiltin) \
- V(DirectCEntry)
-#elif V8_TARGET_ARCH_A64
+#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_A64)
#define CODE_STUB_LIST_ARM(V) \
V(GetProperty) \
V(SetProperty) \
=======================================
--- /branches/bleeding_edge/test/message/message.status Wed Feb 12 09:19:30
2014 UTC
+++ /branches/bleeding_edge/test/message/message.status Wed Feb 12 13:27:13
2014 UTC
@@ -31,23 +31,4 @@
[ALWAYS, {
'bugs/*': [FAIL],
}], # ALWAYS
-
-['arch == a64', {
- # Message tests won't pass until all UNIMPLEMENTED messages are removed.
- 'regress/regress-75': [SKIP],
- 'regress/regress-73': [SKIP],
- 'regress/regress-1527': [SKIP],
- 'try-finally-throw-in-try': [SKIP],
- 'try-finally-throw-in-finally': [SKIP],
- 'try-finally-return-in-finally': [SKIP],
- 'try-catch-finally-throw-in-finally': [SKIP],
- 'try-catch-finally-throw-in-catch-and-finally': [SKIP],
- 'try-catch-finally-throw-in-catch': [SKIP],
- 'try-catch-finally-return-in-finally': [SKIP],
- 'try-catch-finally-no-message': [SKIP],
- 'simple-throw': [SKIP],
- 'replacement-marker-as-argument': [SKIP],
- 'overwritten-builtins': [SKIP],
- 'try-finally-throw-in-try-and-finally': [SKIP],
-}], # 'arch == a64'
]
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.