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 R=rodolph.perfetta@arm.com, ulan@chromium.org Review URL: https://codereview.chromium.org/134333011 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b4214a1221
commit
6ef556bdff
@ -1451,7 +1451,7 @@ uint8_t* Simulator::LoadStoreAddress(unsigned addr_reg,
|
||||
// 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 @@ void Simulator::CheckMemoryAccess(uint8_t* address, uint8_t* stack) {
|
||||
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 @@ void Simulator::VisitException(Instruction* instr) {
|
||||
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()) {
|
||||
|
@ -254,7 +254,9 @@ class Simulator : public DecoderVisitor {
|
||||
}
|
||||
|
||||
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_));
|
||||
|
@ -2637,10 +2637,8 @@ Genesis::Genesis(Isolate* isolate,
|
||||
|
||||
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.
|
||||
|
78
src/checks.h
78
src/checks.h
@ -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 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
|
||||
#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
|
||||
|
||||
|
||||
|
@ -101,13 +101,7 @@ namespace internal {
|
||||
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) \
|
||||
|
@ -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'
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user