v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test-disasm-mips.cc File Reference
#include <stdlib.h>
#include "v8.h"
#include "debug.h"
#include "disasm.h"
#include "disassembler.h"
#include "macro-assembler.h"
#include "serialize.h"
#include "cctest.h"
Include dependency graph for test-disasm-mips.cc:

Go to the source code of this file.

Macros

#define SET_UP()
 
#define COMPARE(asm_, compare_string)
 
#define VERIFY_RUN()
 

Functions

bool DisassembleAndCompare (byte *pc, const char *compare_string)
 
 TEST (Type0)
 

Macro Definition Documentation

#define COMPARE (   asm_,
  compare_string 
)
Value:
{ \
int pc_offset = assm.pc_offset(); \
byte *progcounter = &buffer[pc_offset]; \
assm.asm_; \
if (!DisassembleAndCompare(progcounter, compare_string)) failure = true; \
}
unsigned char byte
Definition: disasm.h:33
bool DisassembleAndCompare(byte *pc, const char *compare_string)

Definition at line 89 of file test-disasm-mips.cc.

Referenced by TEST().

#define SET_UP ( )
Value:
InitializeVM(); \
v8::HandleScope scope; \
byte *buffer = reinterpret_cast<byte*>(malloc(4*1024)); \
Assembler assm(Isolate::Current(), buffer, 4*1024); \
bool failure = false;
unsigned char byte
Definition: disasm.h:33
uint8_t byte
Definition: globals.h:156

Definition at line 77 of file test-disasm-mips.cc.

Referenced by TEST().

#define VERIFY_RUN ( )
Value:
if (failure) { \
V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \
}
void V8_Fatal(const char *file, int line, const char *format,...)
Definition: checks.cc:38

Definition at line 100 of file test-disasm-mips.cc.

Referenced by TEST().

Function Documentation

bool DisassembleAndCompare ( byte pc,
const char *  compare_string 
)

Definition at line 54 of file test-disasm-mips.cc.

References Disassembler::InstructionDecode(), and Vector< T >::start().