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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 125185: X64: Implementation of a bunch of stubs, and some new opcodes. (Closed)
Patch Set: Addressed review comments. Created 11 years, 6 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/x64/codegen-x64.cc ('k') | src/x64/stub-cache-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 void MacroAssembler::Check(Condition cc, const char* msg) { 53 void MacroAssembler::Check(Condition cc, const char* msg) {
54 Label L; 54 Label L;
55 j(cc, &L); 55 j(cc, &L);
56 Abort(msg); 56 Abort(msg);
57 // will not return here 57 // will not return here
58 bind(&L); 58 bind(&L);
59 } 59 }
60 60
61 61
62 void MacroAssembler::NegativeZeroTest(Register result,
63 Register op,
64 Label* then_label) {
65 Label ok;
66 testq(result, result);
67 j(not_zero, &ok);
68 testq(op, op);
69 j(sign, then_label);
70 bind(&ok);
71 }
72
73
62 void MacroAssembler::ConstructAndTestJSFunction() { 74 void MacroAssembler::ConstructAndTestJSFunction() {
63 const int initial_buffer_size = 4 * KB; 75 const int initial_buffer_size = 4 * KB;
64 char* buffer = new char[initial_buffer_size]; 76 char* buffer = new char[initial_buffer_size];
65 MacroAssembler masm(buffer, initial_buffer_size); 77 MacroAssembler masm(buffer, initial_buffer_size);
66 78
67 const uint64_t secret = V8_INT64_C(0xdeadbeefcafebabe); 79 const uint64_t secret = V8_INT64_C(0xdeadbeefcafebabe);
68 Handle<String> constant = 80 Handle<String> constant =
69 Factory::NewStringFromAscii(Vector<const char>("451", 3), TENURED); 81 Factory::NewStringFromAscii(Vector<const char>("451", 3), TENURED);
70 #define __ ACCESS_MASM((&masm)) 82 #define __ ACCESS_MASM((&masm))
71 // Construct a simple JSfunction here, using Assembler and MacroAssembler 83 // Construct a simple JSfunction here, using Assembler and MacroAssembler
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 push(rcx); 676 push(rcx);
665 677
666 // Clear the top frame. 678 // Clear the top frame.
667 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); 679 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address);
668 movq(kScratchRegister, c_entry_fp_address); 680 movq(kScratchRegister, c_entry_fp_address);
669 movq(Operand(kScratchRegister, 0), Immediate(0)); 681 movq(Operand(kScratchRegister, 0), Immediate(0));
670 } 682 }
671 683
672 684
673 } } // namespace v8::internal 685 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698