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

Side by Side Diff: test/cctest/test-assembler-arm.cc

Issue 1758003003: [turbofan] ARM: Reduce out-of-line NaN code size (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 double c; 225 double c;
226 double d; 226 double d;
227 double e; 227 double e;
228 double f; 228 double f;
229 double g; 229 double g;
230 double h; 230 double h;
231 int i; 231 int i;
232 double j; 232 double j;
233 double m; 233 double m;
234 double n; 234 double n;
235 float o;
236 float p;
235 float x; 237 float x;
236 float y; 238 float y;
237 } T; 239 } T;
238 T t; 240 T t;
239 241
240 // Create a function that accepts &t, and loads, manipulates, and stores 242 // Create a function that accepts &t, and loads, manipulates, and stores
241 // the doubles and floats. 243 // the doubles and floats.
242 Assembler assm(isolate, NULL, 0); 244 Assembler assm(isolate, NULL, 0);
243 Label L, C; 245 Label L, C;
244 246
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 __ vstr(d0, r4, offsetof(T, h)); 309 __ vstr(d0, r4, offsetof(T, h));
308 310
309 // Test vneg. 311 // Test vneg.
310 __ vldr(d1, r4, offsetof(T, m)); 312 __ vldr(d1, r4, offsetof(T, m));
311 __ vneg(d0, d1); 313 __ vneg(d0, d1);
312 __ vstr(d0, r4, offsetof(T, m)); 314 __ vstr(d0, r4, offsetof(T, m));
313 __ vldr(d1, r4, offsetof(T, n)); 315 __ vldr(d1, r4, offsetof(T, n));
314 __ vneg(d0, d1); 316 __ vneg(d0, d1);
315 __ vstr(d0, r4, offsetof(T, n)); 317 __ vstr(d0, r4, offsetof(T, n));
316 318
319 // Test vmov for single-precision immediates.
320 __ vmov(s0, 0.25f);
321 __ vstr(s0, r4, offsetof(T, o));
322 __ vmov(s0, -16.0f);
323 __ vstr(s0, r4, offsetof(T, p));
324
317 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); 325 __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
318 326
319 CodeDesc desc; 327 CodeDesc desc;
320 assm.GetCode(&desc); 328 assm.GetCode(&desc);
321 Handle<Code> code = isolate->factory()->NewCode( 329 Handle<Code> code = isolate->factory()->NewCode(
322 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 330 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
323 #ifdef DEBUG 331 #ifdef DEBUG
324 OFStream os(stdout); 332 OFStream os(stdout);
325 code->Print(os); 333 code->Print(os);
326 #endif 334 #endif
327 F3 f = FUNCTION_CAST<F3>(code->entry()); 335 F3 f = FUNCTION_CAST<F3>(code->entry());
328 t.a = 1.5; 336 t.a = 1.5;
329 t.b = 2.75; 337 t.b = 2.75;
330 t.c = 17.17; 338 t.c = 17.17;
331 t.d = 0.0; 339 t.d = 0.0;
332 t.e = 0.0; 340 t.e = 0.0;
333 t.f = 0.0; 341 t.f = 0.0;
334 t.g = -2718.2818; 342 t.g = -2718.2818;
335 t.h = 31415926.5; 343 t.h = 31415926.5;
336 t.i = 0; 344 t.i = 0;
337 t.j = 0; 345 t.j = 0;
338 t.m = -2718.2818; 346 t.m = -2718.2818;
339 t.n = 123.456; 347 t.n = 123.456;
340 t.x = 4.5; 348 t.x = 4.5;
341 t.y = 9.0; 349 t.y = 9.0;
342 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); 350 Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
343 USE(dummy); 351 USE(dummy);
352 CHECK_EQ(-16.0f, t.p);
353 CHECK_EQ(0.25f, t.o);
344 CHECK_EQ(-123.456, t.n); 354 CHECK_EQ(-123.456, t.n);
345 CHECK_EQ(2718.2818, t.m); 355 CHECK_EQ(2718.2818, t.m);
346 CHECK_EQ(2, t.i); 356 CHECK_EQ(2, t.i);
347 CHECK_EQ(2718.2818, t.g); 357 CHECK_EQ(2718.2818, t.g);
348 CHECK_EQ(31415926.5, t.h); 358 CHECK_EQ(31415926.5, t.h);
349 CHECK_EQ(617.0, t.j); 359 CHECK_EQ(617.0, t.j);
350 CHECK_EQ(42.0, t.f); 360 CHECK_EQ(42.0, t.f);
351 CHECK_EQ(1.0, t.e); 361 CHECK_EQ(1.0, t.e);
352 CHECK_EQ(1.000000059604644775390625, t.d); 362 CHECK_EQ(1.000000059604644775390625, t.d);
353 CHECK_EQ(4.25, t.c); 363 CHECK_EQ(4.25, t.c);
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 HandleScope scope(isolate); 2211 HandleScope scope(isolate);
2202 2212
2203 Assembler assm(isolate, NULL, 0); 2213 Assembler assm(isolate, NULL, 0);
2204 __ mov(r0, Operand(isolate->factory()->infinity_value())); 2214 __ mov(r0, Operand(isolate->factory()->infinity_value()));
2205 __ BlockConstPoolFor(1019); 2215 __ BlockConstPoolFor(1019);
2206 for (int i = 0; i < 1019; ++i) __ nop(); 2216 for (int i = 0; i < 1019; ++i) __ nop();
2207 __ vldr(d0, MemOperand(r0, 0)); 2217 __ vldr(d0, MemOperand(r0, 0));
2208 } 2218 }
2209 2219
2210 #undef __ 2220 #undef __
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698