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

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

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 5 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 | « test/cctest/test-code-stubs-mips64.cc ('k') | test/cctest/test-code-stubs-x87.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 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 source_reg.is(rsp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize); 57 source_reg.is(rsp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
58 DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true); 58 DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
59 byte* start = stub.GetCode()->instruction_start(); 59 byte* start = stub.GetCode()->instruction_start();
60 60
61 __ pushq(rbx); 61 __ pushq(rbx);
62 __ pushq(rcx); 62 __ pushq(rcx);
63 __ pushq(rdx); 63 __ pushq(rdx);
64 __ pushq(rsi); 64 __ pushq(rsi);
65 __ pushq(rdi); 65 __ pushq(rdi);
66 66
67 67 const RegisterConfiguration* config = RegisterConfiguration::Crankshaft();
68 const RegisterConfiguration* config =
69 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT);
70 if (!source_reg.is(rsp)) { 68 if (!source_reg.is(rsp)) {
71 // The argument we pass to the stub is not a heap number, but instead 69 // The argument we pass to the stub is not a heap number, but instead
72 // stack-allocated and offset-wise made to look like a heap number for 70 // stack-allocated and offset-wise made to look like a heap number for
73 // the stub. We create that "heap number" after pushing all allocatable 71 // the stub. We create that "heap number" after pushing all allocatable
74 // registers. 72 // registers.
75 int double_argument_slot = 73 int double_argument_slot =
76 (config->num_allocatable_general_registers() - 1) * kPointerSize + 74 (config->num_allocatable_general_registers() - 1) * kPointerSize +
77 kDoubleSize; 75 kDoubleSize;
78 __ leaq(source_reg, MemOperand(rsp, -double_argument_slot - offset)); 76 __ leaq(source_reg, MemOperand(rsp, -double_argument_slot - offset));
79 } 77 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 148
151 for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) { 149 for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
152 for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) { 150 for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
153 RunAllTruncationTests( 151 RunAllTruncationTests(
154 MakeConvertDToIFuncTrampoline(isolate, 152 MakeConvertDToIFuncTrampoline(isolate,
155 source_registers[s], 153 source_registers[s],
156 dest_registers[d])); 154 dest_registers[d]));
157 } 155 }
158 } 156 }
159 } 157 }
OLDNEW
« no previous file with comments | « test/cctest/test-code-stubs-mips64.cc ('k') | test/cctest/test-code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698