38 using namespace v8::internal;
68 CHECK(code->IsCode());
71 ::printf(
"f() = %d\n", res);
107 CHECK(code->IsCode());
110 ::printf(
"f() = %d\n", res);
129 __ ori(t0, zero_reg, 0);
132 __ ori(t0, t0, 0x0f0f);
133 __ ori(t0, t0, 0xf0f0);
135 __ addiu(t2, t1, -0x10);
138 __ li(t0, 0x00000004);
139 __ li(t1, 0x00001234);
140 __ li(t2, 0x12345678);
141 __ li(t3, 0x7fffffff);
142 __ li(t4, 0xfffffffc);
143 __ li(t5, 0xffffedcc);
144 __ li(t6, 0xedcba988);
145 __ li(t7, 0x80000000);
183 __ addiu(v0, zero_reg, 0x7421);
184 __ addiu(v0, v0, -0x1);
185 __ addiu(v0, v0, -0x20);
188 __ addiu(v1, t3, 0x1);
192 __ slti(v0, t1, 0x00002000);
193 __ slti(v0, v0, 0xffff8000);
196 __ sltiu(v0, t1, 0x00002000);
197 __ sltiu(v0, v0, 0x00008000);
201 __ andi(v0, t1, 0xf0f0);
202 __ ori(v0, v0, 0x8a00);
203 __ xori(v0, v0, 0x83cc);
221 __ Ins(a0, t1, 12, 8);
224 __ Ext(a1, a0, 8, 12);
230 __ li(v0, 0x31415926);
248 CHECK(code->IsCode());
251 ::printf(
"f() = %d\n", res);
321 CHECK(code->IsCode());
339 CHECK_EQ(10.97451593465515908537, t.g);
389 CHECK(code->IsCode());
455 CHECK(code->IsCode());
514 __ ori(t5, t5, 0x3333);
528 CHECK(code->IsCode());
564 Label neither_is_nan, less_than, outa_here;
569 __ bc1f(&neither_is_nan);
572 __ Branch(&outa_here);
574 __ bind(&neither_is_nan);
581 __ bc1t(&less_than, 2);
585 __ Branch(&outa_here);
605 CHECK(code->IsCode());
653 __ Ror(t1, t0, 0x0004);
654 __ Ror(t2, t0, 0x0008);
655 __ Ror(t3, t0, 0x000c);
656 __ Ror(t4, t0, 0x0010);
657 __ Ror(t5, t0, 0x0014);
658 __ Ror(t6, t0, 0x0018);
659 __ Ror(t7, t0, 0x001c);
704 CHECK(code->IsCode());
706 t.input = 0x12345678;
709 CHECK_EQ(0x81234567, t.result_rotr_4);
710 CHECK_EQ(0x78123456, t.result_rotr_8);
711 CHECK_EQ(0x67812345, t.result_rotr_12);
712 CHECK_EQ(0x56781234, t.result_rotr_16);
713 CHECK_EQ(0x45678123, t.result_rotr_20);
714 CHECK_EQ(0x34567812, t.result_rotr_24);
715 CHECK_EQ(0x23456781, t.result_rotr_28);
717 CHECK_EQ(0x81234567, t.result_rotrv_4);
718 CHECK_EQ(0x78123456, t.result_rotrv_8);
719 CHECK_EQ(0x67812345, t.result_rotrv_12);
720 CHECK_EQ(0x56781234, t.result_rotrv_16);
721 CHECK_EQ(0x45678123, t.result_rotrv_20);
722 CHECK_EQ(0x34567812, t.result_rotrv_24);
723 CHECK_EQ(0x23456781, t.result_rotrv_28);
734 Label exit, exit2, exit3;
752 CHECK(code->IsCode());
806 CHECK(code->IsCode());
808 t.a = 2.147483646e+09;
809 t.b_word = 0x0ff00ff0;
937 CHECK(code->IsCode());
939 t.reg_init = 0xaabbccdd;
940 t.mem_init = 0x11223344;
1042 CHECK(code->IsCode());
1066 double cvt_small_out;
1067 uint32_t trunc_big_out;
1068 uint32_t trunc_small_out;
1069 uint32_t cvt_big_in;
1070 uint32_t cvt_small_in;
1099 CHECK(code->IsCode());
1102 t.cvt_big_in = 0xFFFFFFFF;
1103 t.cvt_small_in = 333;
1108 CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in));
1109 CHECK_EQ(t.cvt_small_out, static_cast<double>(t.cvt_small_in));
1111 CHECK_EQ(static_cast<int>(t.trunc_big_out), static_cast<int>(t.cvt_big_in));
1112 CHECK_EQ(static_cast<int>(t.trunc_small_out),
1113 static_cast<int>(t.cvt_small_in));
1123 #define ROUND_STRUCT_ELEMENT(x) \
1124 int32_t x##_up_out; \
1125 int32_t x##_down_out; \
1126 int32_t neg_##x##_up_out; \
1127 int32_t neg_##x##_down_out; \
1128 uint32_t x##_err1_out; \
1129 uint32_t x##_err2_out; \
1130 uint32_t x##_err3_out; \
1131 uint32_t x##_err4_out; \
1132 int32_t x##_invalid_result;
1136 double round_down_in;
1137 double neg_round_up_in;
1138 double neg_round_down_in;
1152 #undef ROUND_STRUCT_ELEMENT
1160 #define RUN_ROUND_TEST(x) \
1161 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, round_up_in))); \
1162 __ x##_w_d(f0, f0); \
1163 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, x##_up_out))); \
1165 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, round_down_in))); \
1166 __ x##_w_d(f0, f0); \
1167 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, x##_down_out))); \
1169 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, neg_round_up_in))); \
1170 __ x##_w_d(f0, f0); \
1171 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, neg_##x##_up_out))); \
1173 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, neg_round_down_in))); \
1174 __ x##_w_d(f0, f0); \
1175 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, neg_##x##_down_out))); \
1177 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err1_in))); \
1178 __ ctc1(zero_reg, FCSR); \
1179 __ x##_w_d(f0, f0); \
1180 __ cfc1(a2, FCSR); \
1181 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err1_out))); \
1183 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err2_in))); \
1184 __ ctc1(zero_reg, FCSR); \
1185 __ x##_w_d(f0, f0); \
1186 __ cfc1(a2, FCSR); \
1187 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err2_out))); \
1189 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err3_in))); \
1190 __ ctc1(zero_reg, FCSR); \
1191 __ x##_w_d(f0, f0); \
1192 __ cfc1(a2, FCSR); \
1193 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err3_out))); \
1195 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err4_in))); \
1196 __ ctc1(zero_reg, FCSR); \
1197 __ x##_w_d(f0, f0); \
1198 __ cfc1(a2, FCSR); \
1199 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err4_out))); \
1200 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, x##_invalid_result)));
1220 CHECK(code->IsCode());
1223 t.round_up_in = 123.51;
1224 t.round_down_in = 123.49;
1225 t.neg_round_up_in = -123.5;
1226 t.neg_round_down_in = -123.49;
1229 t.err3_in =
static_cast<double>(1) + 0xFFFFFFFF;
1235 #define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask))
1236 #define CHECK_ROUND_RESULT(type) \
1237 CHECK(GET_FPU_ERR(t.type##_err1_out) & kFCSRInexactFlagMask); \
1238 CHECK_EQ(0, GET_FPU_ERR(t.type##_err2_out)); \
1239 CHECK(GET_FPU_ERR(t.type##_err3_out) & kFCSRInvalidOpFlagMask); \
1240 CHECK(GET_FPU_ERR(t.type##_err4_out) & kFCSRInvalidOpFlagMask); \
1241 CHECK_EQ(kFPUInvalidResult, t.type##_invalid_result);
1258 __ beq(v0, v1, &target);
1260 __ bne(v0, v1, &target);
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
#define CHECK_EQ(expected, value)
#define RUN_ROUND_TEST(x)
Object *(* F3)(void *p, int p1, int p2, int p3, int p4)
static Code * cast(Object *obj)
#define OFFSET_OF(type, field)
#define CHECK_ROUND_RESULT(type)
void GetCode(CodeDesc *desc)
Object *(* F2)(int x, int y, int p2, int p3, int p4)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
static i::Isolate * i_isolate()
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4)
#define T(name, string, precedence)
MUST_USE_RESULT MaybeObject * CreateCode(const CodeDesc &desc, Code::Flags flags, Handle< Object > self_reference, bool immovable=false, bool crankshafted=false, int prologue_offset=Code::kPrologueOffsetNotSet)
static void InitializeVM()
const FPUControlRegister FCSR
#define ROUND_STRUCT_ELEMENT(x)
static Flags ComputeFlags(Kind kind, InlineCacheState ic_state=UNINITIALIZED, ExtraICState extra_ic_state=kNoExtraICState, StubType type=NORMAL, InlineCacheHolderFlag holder=OWN_MAP)
Object *(* F1)(int x, int p1, int p2, int p3, int p4)