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

Side by Side Diff: test/cctest/test-code-stubs-x64.cc

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. Created 5 years, 2 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Rrdistribution and use in source and binary forms, with or without 2 // Rrdistribution 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 // * Rrdistributions of source code must retain the above copyright 6 // * Rrdistributions 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 // * Rrdistributions in binary form must reproduce the above 8 // * Rrdistributions 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true); 57 DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
58 byte* start = stub.GetCode()->instruction_start(); 58 byte* start = stub.GetCode()->instruction_start();
59 59
60 __ pushq(rbx); 60 __ pushq(rbx);
61 __ pushq(rcx); 61 __ pushq(rcx);
62 __ pushq(rdx); 62 __ pushq(rdx);
63 __ pushq(rsi); 63 __ pushq(rsi);
64 __ pushq(rdi); 64 __ pushq(rdi);
65 65
66 66
67 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); 67 const RegisterConfiguration* config =
68 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT);
68 if (!source_reg.is(rsp)) { 69 if (!source_reg.is(rsp)) {
69 // The argument we pass to the stub is not a heap number, but instead 70 // The argument we pass to the stub is not a heap number, but instead
70 // stack-allocated and offset-wise made to look like a heap number for 71 // stack-allocated and offset-wise made to look like a heap number for
71 // the stub. We create that "heap number" after pushing all allocatable 72 // the stub. We create that "heap number" after pushing all allocatable
72 // registers. 73 // registers.
73 int double_argument_slot = 74 int double_argument_slot =
74 (config->num_allocatable_general_registers() - 1) * kPointerSize + 75 (config->num_allocatable_general_registers() - 1) * kPointerSize +
75 kDoubleSize; 76 kDoubleSize;
76 __ leaq(source_reg, MemOperand(rsp, -double_argument_slot - offset)); 77 __ leaq(source_reg, MemOperand(rsp, -double_argument_slot - offset));
77 } 78 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 149
149 for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) { 150 for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
150 for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) { 151 for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
151 RunAllTruncationTests( 152 RunAllTruncationTests(
152 MakeConvertDToIFuncTrampoline(isolate, 153 MakeConvertDToIFuncTrampoline(isolate,
153 source_registers[s], 154 source_registers[s],
154 dest_registers[d])); 155 dest_registers[d]));
155 } 156 }
156 } 157 }
157 } 158 }
OLDNEW
« no previous file with comments | « test/cctest/test-code-stubs-mips64.cc ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698