summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-assembler-ia32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-assembler-ia32.cc')
-rw-r--r--deps/v8/test/cctest/test-assembler-ia32.cc44
1 files changed, 28 insertions, 16 deletions
diff --git a/deps/v8/test/cctest/test-assembler-ia32.cc b/deps/v8/test/cctest/test-assembler-ia32.cc
index e62cc210eb..12733c2cdd 100644
--- a/deps/v8/test/cctest/test-assembler-ia32.cc
+++ b/deps/v8/test/cctest/test-assembler-ia32.cc
@@ -310,7 +310,8 @@ TEST(AssemblerIa329) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[256];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
enum { kEqual = 0, kGreater = 1, kLess = 2, kNaN = 3, kUndefined = 4 };
Label equal_l, less_l, greater_l, nan_l;
__ fld_d(Operand(esp, 3 * kPointerSize));
@@ -443,6 +444,7 @@ TEST(AssemblerMultiByteNop) {
void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
+ v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
CHECK(args[0]->IsArray());
v8::Local<v8::Array> vec = v8::Local<v8::Array>::Cast(args[0]);
@@ -456,7 +458,8 @@ void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
// Store input vector on the stack.
for (unsigned i = 0; i < ELEMENT_COUNT; ++i) {
- __ push(Immediate(vec->Get(i)->Int32Value()));
+ __ push(Immediate(
+ vec->Get(context, i).ToLocalChecked()->Int32Value(context).FromJust()));
}
// Read vector into a xmm register.
@@ -490,7 +493,7 @@ TEST(StackAlignmentForSSE2) {
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
- v8::Handle<v8::ObjectTemplate> global_template =
+ v8::Local<v8::ObjectTemplate> global_template =
v8::ObjectTemplate::New(isolate);
global_template->Set(v8_str("do_sse2"),
v8::FunctionTemplate::New(isolate, DoSSE2));
@@ -502,20 +505,21 @@ TEST(StackAlignmentForSSE2) {
"}");
v8::Local<v8::Object> global_object = env->Global();
- v8::Local<v8::Function> foo =
- v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo")));
+ v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast(
+ global_object->Get(env.local(), v8_str("foo")).ToLocalChecked());
int32_t vec[ELEMENT_COUNT] = { -1, 1, 1, 1 };
v8::Local<v8::Array> v8_vec = v8::Array::New(isolate, ELEMENT_COUNT);
for (unsigned i = 0; i < ELEMENT_COUNT; i++) {
- v8_vec->Set(i, v8_num(vec[i]));
+ v8_vec->Set(env.local(), i, v8_num(vec[i])).FromJust();
}
v8::Local<v8::Value> args[] = { v8_vec };
- v8::Local<v8::Value> result = foo->Call(global_object, 1, args);
+ v8::Local<v8::Value> result =
+ foo->Call(env.local(), global_object, 1, args).ToLocalChecked();
// The mask should be 0b1000.
- CHECK_EQ(8, result->Int32Value());
+ CHECK_EQ(8, result->Int32Value(env.local()).FromJust());
}
#undef ELEMENT_COUNT
@@ -529,7 +533,8 @@ TEST(AssemblerIa32Extractps) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[256];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{ CpuFeatureScope fscope41(&assm, SSE4_1);
__ movsd(xmm1, Operand(esp, 4));
__ extractps(eax, xmm1, 0x1);
@@ -560,7 +565,8 @@ TEST(AssemblerIa32SSE) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[256];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
__ movss(xmm0, Operand(esp, kPointerSize));
__ movss(xmm1, Operand(esp, 2 * kPointerSize));
@@ -597,7 +603,8 @@ TEST(AssemblerX64FMA_sd) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[1024];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
CpuFeatureScope fscope(&assm, FMA3);
Label exit;
@@ -825,7 +832,8 @@ TEST(AssemblerX64FMA_ss) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[1024];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
CpuFeatureScope fscope(&assm, FMA3);
Label exit;
@@ -1052,7 +1060,8 @@ TEST(AssemblerIa32BMI1) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[1024];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
CpuFeatureScope fscope(&assm, BMI1);
Label exit;
@@ -1159,7 +1168,8 @@ TEST(AssemblerIa32LZCNT) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[256];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
CpuFeatureScope fscope(&assm, LZCNT);
Label exit;
@@ -1206,7 +1216,8 @@ TEST(AssemblerIa32POPCNT) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[256];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
CpuFeatureScope fscope(&assm, POPCNT);
Label exit;
@@ -1253,7 +1264,8 @@ TEST(AssemblerIa32BMI2) {
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
HandleScope scope(isolate);
v8::internal::byte buffer[2048];
- MacroAssembler assm(isolate, buffer, sizeof buffer);
+ MacroAssembler assm(isolate, buffer, sizeof(buffer),
+ v8::internal::CodeObjectRequired::kYes);
{
CpuFeatureScope fscope(&assm, BMI2);
Label exit;