Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: test/cctest/test-assembler-mips.cc

Issue 1457223005: Remove a bunch of Isolate::Current() callsites from simulators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-assembler-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-mips.cc
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc
index 49e5c1698ae6cc81a9f8fba5494e232fe600bf36..e696b6d6682bf42e059f7cf984b15db7f24c5976 100644
--- a/test/cctest/test-assembler-mips.cc
+++ b/test/cctest/test-assembler-mips.cc
@@ -72,7 +72,8 @@ TEST(MIPS0) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F2 f = FUNCTION_CAST<F2>(code->entry());
- int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
CHECK_EQ(static_cast<int32_t>(0xabc), res);
}
@@ -107,7 +108,8 @@ TEST(MIPS1) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F1 f = FUNCTION_CAST<F1>(code->entry());
- int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0));
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, 50, 0, 0, 0, 0));
CHECK_EQ(1275, res);
}
@@ -244,7 +246,8 @@ TEST(MIPS2) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F2 f = FUNCTION_CAST<F2>(code->entry());
- int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
CHECK_EQ(static_cast<int32_t>(0x31415926), res);
}
@@ -361,7 +364,7 @@ TEST(MIPS3) {
t.fd = 0.0;
t.fe = 0.0;
t.ff = 0.0;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
// Expected double results.
CHECK_EQ(1.5e14, t.a);
@@ -442,7 +445,7 @@ TEST(MIPS4) {
t.a = 1.5e22;
t.b = 2.75e11;
t.c = 17.17;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(2.75e11, t.a);
@@ -506,7 +509,7 @@ TEST(MIPS5) {
t.b = 2.75e8;
t.i = 12345678;
t.j = -100000;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(12345678.0, t.a);
@@ -574,7 +577,7 @@ TEST(MIPS6) {
F3 f = FUNCTION_CAST<F3>(code->entry());
t.ui = 0x11223344;
t.si = 0x99aabbcc;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1);
@@ -672,7 +675,7 @@ TEST(MIPS7) {
t.e = 0.0;
t.f = 0.0;
t.result = 0;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(1.5e14, t.a);
CHECK_EQ(2.75e11, t.b);
@@ -763,7 +766,7 @@ TEST(MIPS8) {
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F3 f = FUNCTION_CAST<F3>(code->entry());
t.input = 0x12345678;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0x0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0);
USE(dummy);
CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4);
CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8);
@@ -871,7 +874,7 @@ TEST(MIPS10) {
F3 f = FUNCTION_CAST<F3>(code->entry());
t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double.
t.b_word = 0x0ff00ff0; // 0x0FF00FF0 -> 0x as double.
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp);
CHECK_EQ(static_cast<int32_t>(0xFF800000), t.dbl_mant);
@@ -1000,7 +1003,7 @@ TEST(MIPS11) {
t.reg_init = 0xaabbccdd;
t.mem_init = 0x11223344;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
#if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -1130,7 +1133,7 @@ TEST(MIPS12) {
t.y3 = 0XBABA;
t.y4 = 0xDEDA;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(3, t.y1);
@@ -1181,7 +1184,7 @@ TEST(MIPS13) {
t.cvt_big_in = 0xFFFFFFFF;
t.cvt_small_in = 333;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in));
@@ -1305,7 +1308,7 @@ TEST(MIPS14) {
t.err3_in = static_cast<double>(1) + 0xFFFFFFFF;
t.err4_in = NAN;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
#define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask))
@@ -1395,7 +1398,7 @@ TEST(seleqz_selnez) {
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F3 f = FUNCTION_CAST<F3>(code->entry());
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, 1);
CHECK_EQ(test.b, 0);
@@ -1423,7 +1426,7 @@ TEST(seleqz_selnez) {
test.f = tests_D[j];
test.i = inputs_S[i];
test.j = tests_S[j];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.g, outputs_D[i]);
CHECK_EQ(test.h, 0);
CHECK_EQ(test.k, outputs_S[i]);
@@ -1431,7 +1434,7 @@ TEST(seleqz_selnez) {
test.f = tests_D[j+1];
test.j = tests_S[j+1];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.g, 0);
CHECK_EQ(test.h, outputs_D[i]);
CHECK_EQ(test.k, 0);
@@ -1500,7 +1503,7 @@ TEST(min_max) {
test.e = inputse[i];
test.f = inputsf[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
if (i < kTableLength - 1) {
CHECK_EQ(test.c, outputsdmin[i]);
@@ -1616,7 +1619,7 @@ TEST(rint_d) {
test.fcsr = fcsr_inputs[j];
for (int i = 0; i < kTableLength; i++) {
test.a = inputs[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.b, outputs[j][i]);
}
}
@@ -1682,13 +1685,13 @@ TEST(sel) {
test.ft = inputs_ft[i];
test.fd = tests_S[j];
test.fs = inputs_fs[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dd, inputs_ds[i]);
CHECK_EQ(test.fd, inputs_fs[i]);
test.dd = tests_D[j+1];
test.fd = tests_S[j+1];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dd, inputs_dt[i]);
CHECK_EQ(test.fd, inputs_ft[i]);
}
@@ -1795,7 +1798,7 @@ TEST(rint_s) {
test.fcsr = fcsr_inputs[j];
for (int i = 0; i < kTableLength; i++) {
test.a = inputs[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.b, outputs[j][i]);
}
}
@@ -1883,7 +1886,7 @@ TEST(mina_maxa) {
test.b = inputsb[i];
test.c = inputsc[i];
test.d = inputsd[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
if (i < kTableLength - 1) {
CHECK_EQ(test.resd, resd[i]);
CHECK_EQ(test.resf, resf[i]);
@@ -1952,7 +1955,7 @@ TEST(trunc_l) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2029,14 +2032,14 @@ TEST(movz_movn) {
test.c = inputs_S[i];
test.rt = 1;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.b, test.bold);
CHECK_EQ(test.d, test.dold);
CHECK_EQ(test.b1, outputs_D[i]);
CHECK_EQ(test.d1, outputs_S[i]);
test.rt = 0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.b, outputs_D[i]);
CHECK_EQ(test.d, outputs_S[i]);
CHECK_EQ(test.b1, test.bold1);
@@ -2126,13 +2129,13 @@ TEST(movt_movd) {
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F3 f = FUNCTION_CAST<F3>(code->entry());
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dstf, outputs_S[i]);
CHECK_EQ(test.dstd, outputs_D[i]);
CHECK_EQ(test.dstf1, test.dstfold1);
CHECK_EQ(test.dstd1, test.dstdold1);
test.fcsr = 0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dstf, test.dstfold);
CHECK_EQ(test.dstd, test.dstdold);
CHECK_EQ(test.dstf1, outputs_S[i]);
@@ -2214,7 +2217,7 @@ TEST(cvt_w_d) {
test.fcsr = fcsr_inputs[j];
for (int i = 0; i < kTableLength; i++) {
test.a = inputs[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.b, outputs[j][i]);
}
}
@@ -2271,7 +2274,7 @@ TEST(trunc_w) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2328,7 +2331,7 @@ TEST(round_w) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2386,7 +2389,7 @@ TEST(round_l) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2456,7 +2459,7 @@ TEST(sub) {
test.b = inputft_S[i];
test.c = inputfs_D[i];
test.d = inputft_D[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.resultS, outputs_S[i]);
CHECK_EQ(test.resultD, outputs_D[i]);
}
@@ -2537,7 +2540,7 @@ TEST(sqrt_rsqrt_recip) {
test.a = inputs_S[i];
test.c = inputs_D[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.resultS, outputs_S[i]);
CHECK_EQ(test.resultD, outputs_D[i]);
@@ -2613,7 +2616,7 @@ TEST(neg) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_S[i];
test.c = inputs_D[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.resultS, outputs_S[i]);
CHECK_EQ(test.resultD, outputs_D[i]);
}
@@ -2672,7 +2675,7 @@ TEST(mul) {
test.b = inputft_S[i];
test.c = inputfs_D[i];
test.d = inputft_D[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]);
CHECK_EQ(test.resultD, inputfs_D[i]*inputft_D[i]);
}
@@ -2727,7 +2730,7 @@ TEST(mov) {
test.a = inputs_D[i];
test.c = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.b, outputs_D[i]);
CHECK_EQ(test.d, outputs_S[i]);
}
@@ -2784,7 +2787,7 @@ TEST(floor_w) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2842,7 +2845,7 @@ TEST(floor_l) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2900,7 +2903,7 @@ TEST(ceil_w) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -2958,7 +2961,7 @@ TEST(ceil_l) {
for (int i = 0; i < kTableLength; i++) {
test.a = inputs_D[i];
test.b = inputs_S[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, outputs[i]);
CHECK_EQ(test.d, test.c);
}
@@ -3024,7 +3027,8 @@ TEST(jump_tables1) {
#endif
F1 f = FUNCTION_CAST<F1>(code->entry());
for (int i = 0; i < kNumCases; ++i) {
- int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, i, 0, 0, 0, 0));
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
::printf("f(%d) = %d\n", i, res);
CHECK_EQ(values[i], res);
}
@@ -3093,7 +3097,8 @@ TEST(jump_tables2) {
#endif
F1 f = FUNCTION_CAST<F1>(code->entry());
for (int i = 0; i < kNumCases; ++i) {
- int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, i, 0, 0, 0, 0));
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
::printf("f(%d) = %d\n", i, res);
CHECK_EQ(values[i], res);
}
@@ -3169,7 +3174,8 @@ TEST(jump_tables3) {
#endif
F1 f = FUNCTION_CAST<F1>(code->entry());
for (int i = 0; i < kNumCases; ++i) {
- Handle<Object> result(CALL_GENERATED_CODE(f, i, 0, 0, 0, 0), isolate);
+ Handle<Object> result(
+ CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate);
#ifdef OBJECT_PRINT
::printf("f(%d) = ", i);
result->Print(std::cout);
@@ -3217,7 +3223,7 @@ TEST(BITSWAP) {
F3 f = FUNCTION_CAST<F3>(code->entry());
t.r1 = 0x781A15C3;
t.r2 = 0x8B71FCDE;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
CHECK_EQ(static_cast<int32_t>(0x1E58A8C3), t.r1);
@@ -3373,7 +3379,7 @@ TEST(class_fmt) {
t.fPosSubnorm = FLT_MIN / 20.0;
t.fPosZero = +0.0;
- Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+ Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
// Expected double results.
CHECK_EQ(bit_cast<int64_t>(t.dSignalingNan), 0x001);
@@ -3443,34 +3449,34 @@ TEST(ABS) {
F3 f = FUNCTION_CAST<F3>(code->entry());
test.a = -2.0;
test.b = -2.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, 2.0);
CHECK_EQ(test.b, 2.0);
test.a = 2.0;
test.b = 2.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, 2.0);
CHECK_EQ(test.b, 2.0);
// Testing biggest positive number
test.a = std::numeric_limits<double>::max();
test.b = std::numeric_limits<float>::max();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, std::numeric_limits<double>::max());
CHECK_EQ(test.b, std::numeric_limits<float>::max());
// Testing smallest negative number
test.a = -std::numeric_limits<double>::max(); // lowest()
test.b = -std::numeric_limits<float>::max(); // lowest()
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, std::numeric_limits<double>::max());
CHECK_EQ(test.b, std::numeric_limits<float>::max());
// Testing smallest positive number
test.a = -std::numeric_limits<double>::min();
test.b = -std::numeric_limits<float>::min();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, std::numeric_limits<double>::min());
CHECK_EQ(test.b, std::numeric_limits<float>::min());
@@ -3479,7 +3485,7 @@ TEST(ABS) {
/ std::numeric_limits<double>::min();
test.b = -std::numeric_limits<float>::max()
/ std::numeric_limits<float>::min();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.a, std::numeric_limits<double>::max()
/ std::numeric_limits<double>::min());
CHECK_EQ(test.b, std::numeric_limits<float>::max()
@@ -3487,13 +3493,13 @@ TEST(ABS) {
test.a = std::numeric_limits<double>::quiet_NaN();
test.b = std::numeric_limits<float>::quiet_NaN();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(std::isnan(test.a), true);
CHECK_EQ(std::isnan(test.b), true);
test.a = std::numeric_limits<double>::signaling_NaN();
test.b = std::numeric_limits<float>::signaling_NaN();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(std::isnan(test.a), true);
CHECK_EQ(std::isnan(test.b), true);
}
@@ -3538,7 +3544,7 @@ TEST(ADD_FMT) {
test.b = 3.0;
test.fa = 2.0;
test.fb = 3.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, 5.0);
CHECK_EQ(test.fc, 5.0);
@@ -3546,7 +3552,7 @@ TEST(ADD_FMT) {
test.b = -std::numeric_limits<double>::max(); // lowest()
test.fa = std::numeric_limits<float>::max();
test.fb = -std::numeric_limits<float>::max(); // lowest()
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.c, 0.0);
CHECK_EQ(test.fc, 0.0);
@@ -3554,7 +3560,7 @@ TEST(ADD_FMT) {
test.b = std::numeric_limits<double>::max();
test.fa = std::numeric_limits<float>::max();
test.fb = std::numeric_limits<float>::max();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(std::isfinite(test.c), false);
CHECK_EQ(std::isfinite(test.fc), false);
@@ -3562,7 +3568,7 @@ TEST(ADD_FMT) {
test.b = std::numeric_limits<double>::signaling_NaN();
test.fa = 5.0;
test.fb = std::numeric_limits<float>::signaling_NaN();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(std::isnan(test.c), true);
CHECK_EQ(std::isnan(test.fc), true);
}
@@ -3692,7 +3698,7 @@ TEST(C_COND_FMT) {
test.dOp2 = 3.0;
test.fOp1 = 2.0;
test.fOp2 = 3.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 0U);
CHECK_EQ(test.dEq, 0U);
@@ -3714,7 +3720,7 @@ TEST(C_COND_FMT) {
test.dOp2 = std::numeric_limits<double>::min();
test.fOp1 = std::numeric_limits<float>::min();
test.fOp2 = -std::numeric_limits<float>::max(); // lowest()
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 0U);
CHECK_EQ(test.dEq, 0U);
@@ -3736,7 +3742,7 @@ TEST(C_COND_FMT) {
test.dOp2 = -std::numeric_limits<double>::max(); // lowest()
test.fOp1 = std::numeric_limits<float>::max();
test.fOp2 = std::numeric_limits<float>::max();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 0U);
CHECK_EQ(test.dEq, 1U);
@@ -3758,7 +3764,7 @@ TEST(C_COND_FMT) {
test.dOp2 = 0.0;
test.fOp1 = std::numeric_limits<float>::quiet_NaN();
test.fOp2 = 0.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 1U);
CHECK_EQ(test.dEq, 0U);
@@ -3897,7 +3903,7 @@ TEST(CMP_COND_FMT) {
test.dOp2 = 3.0;
test.fOp1 = 2.0;
test.fOp2 = 3.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -3922,7 +3928,7 @@ TEST(CMP_COND_FMT) {
test.dOp2 = std::numeric_limits<double>::min();
test.fOp1 = std::numeric_limits<float>::min();
test.fOp2 = -std::numeric_limits<float>::max(); // lowest()
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -3947,7 +3953,7 @@ TEST(CMP_COND_FMT) {
test.dOp2 = -std::numeric_limits<double>::max(); // lowest()
test.fOp1 = std::numeric_limits<float>::max();
test.fOp2 = std::numeric_limits<float>::max();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dEq), dTrue);
@@ -3972,7 +3978,7 @@ TEST(CMP_COND_FMT) {
test.dOp2 = 0.0;
test.fOp1 = std::numeric_limits<float>::quiet_NaN();
test.fOp2 = 0.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
CHECK_EQ(bit_cast<uint64_t>(test.dUn), dTrue);
CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4086,7 +4092,7 @@ TEST(CVT) {
test.cvt_w_s_in = -0.51;
test.cvt_w_d_in = -0.51;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4118,7 +4124,7 @@ TEST(CVT) {
test.cvt_w_s_in = 0.49;
test.cvt_w_d_in = 0.49;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4149,7 +4155,7 @@ TEST(CVT) {
test.cvt_w_s_in = std::numeric_limits<float>::max();
test.cvt_w_d_in = std::numeric_limits<double>::max();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4181,7 +4187,7 @@ TEST(CVT) {
test.cvt_w_s_in = -std::numeric_limits<float>::max(); // lowest()
test.cvt_w_d_in = -std::numeric_limits<double>::max(); // lowest()
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4220,7 +4226,7 @@ TEST(CVT) {
test.cvt_w_s_in = std::numeric_limits<float>::min();
test.cvt_w_d_in = std::numeric_limits<double>::min();
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4289,7 +4295,7 @@ TEST(DIV_FMT) {
F3 f = FUNCTION_CAST<F3>(code->entry());
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
const int test_size = 3;
@@ -4330,7 +4336,7 @@ TEST(DIV_FMT) {
test.fOp1 = fOp1[i];
test.fOp2 = fOp2[i];
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dRes, dRes[i]);
CHECK_EQ(test.fRes, fRes[i]);
}
@@ -4340,7 +4346,7 @@ TEST(DIV_FMT) {
test.fOp1 = FLT_MAX;
test.fOp2 = -0.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(false, std::isfinite(test.dRes));
CHECK_EQ(false, std::isfinite(test.fRes));
@@ -4349,7 +4355,7 @@ TEST(DIV_FMT) {
test.fOp1 = 0.0;
test.fOp2 = -0.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(true, std::isnan(test.dRes));
CHECK_EQ(true, std::isnan(test.fRes));
@@ -4358,7 +4364,7 @@ TEST(DIV_FMT) {
test.fOp1 = std::numeric_limits<float>::quiet_NaN();
test.fOp2 = -5.0;
- (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
CHECK_EQ(true, std::isnan(test.dRes));
CHECK_EQ(true, std::isnan(test.fRes));
}
@@ -4381,10 +4387,8 @@ uint32_t run_align(uint32_t rs_value, uint32_t rt_value, uint8_t bp) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, rs_value,
- rt_value,
- 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(
+ isolate, f, rs_value, rt_value, 0, 0, 0));
return res;
}
@@ -4437,8 +4441,8 @@ uint32_t run_aluipc(int16_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
PC = (uint32_t) f; // Set the program counter.
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -4491,8 +4495,8 @@ uint32_t run_auipc(int16_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
PC = (uint32_t) f; // Set the program counter.
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -4566,8 +4570,8 @@ uint32_t run_lwpc(int offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -4650,8 +4654,8 @@ uint32_t run_jic(int16_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -4722,8 +4726,8 @@ uint64_t run_beqzc(int32_t value, int32_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, value, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0));
return res;
}
@@ -4816,8 +4820,8 @@ uint32_t run_jialc(int16_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -4867,8 +4871,8 @@ uint64_t run_addiupc(int32_t imm19) {
F2 f = FUNCTION_CAST<F2>(code->entry());
PC = (uint32_t) f; // Set the program counter.
- uint32_t rs =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, imm19, 0, 0, 0, 0));
+ uint32_t rs = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, imm19, 0, 0, 0, 0));
return rs;
}
@@ -4950,8 +4954,8 @@ int32_t run_bc(int32_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- int32_t res =
- reinterpret_cast<int32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ int32_t res = reinterpret_cast<int32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -5032,8 +5036,8 @@ int32_t run_balc(int32_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- int32_t res =
- reinterpret_cast<int32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ int32_t res = reinterpret_cast<int32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -5090,8 +5094,8 @@ uint32_t run_bal(int16_t offset) {
F2 f = FUNCTION_CAST<F2>(code->entry());
- uint32_t res =
- reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0));
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
return res;
}
@@ -5142,8 +5146,8 @@ TEST(Trampoline) {
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F2 f = FUNCTION_CAST<F2>(code->entry());
- int32_t res =
- reinterpret_cast<int32_t>(CALL_GENERATED_CODE(f, 42, 42, 0, 0, 0));
+ int32_t res = reinterpret_cast<int32_t>(
+ CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0));
CHECK_EQ(res, 0);
}
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698