// 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)) {
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");
}
}
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()) {
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.
#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
[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'
]