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

Side by Side Diff: src/mips/macro-assembler-mips.h

Issue 9227007: Version 3.8.6 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips/macro-assembler-mips.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // but won't touch other registers except in special cases. 46 // but won't touch other registers except in special cases.
47 // 47 //
48 // Per the MIPS ABI, register t9 must be used for indirect function call 48 // Per the MIPS ABI, register t9 must be used for indirect function call
49 // via 'jalr t9' or 'jr t9' instructions. This is relied upon by gcc when 49 // via 'jalr t9' or 'jr t9' instructions. This is relied upon by gcc when
50 // trying to update gp register for position-independent-code. Whenever 50 // trying to update gp register for position-independent-code. Whenever
51 // MIPS generated code calls C code, it must be via t9 register. 51 // MIPS generated code calls C code, it must be via t9 register.
52 52
53 53
54 // Register aliases. 54 // Register aliases.
55 // cp is assumed to be a callee saved register. 55 // cp is assumed to be a callee saved register.
56 const Register lithiumScratchReg = s3; // Scratch register. 56 const Register kLithiumScratchReg = s3; // Scratch register.
57 const Register lithiumScratchReg2 = s4; // Scratch register. 57 const Register kLithiumScratchReg2 = s4; // Scratch register.
58 const Register condReg = s5; // Simulated (partial) condition code for mips. 58 const Register kCondReg = s5; // Simulated (partial) condition code for mips.
59 const Register roots = s6; // Roots array pointer. 59 const Register kRootRegister = s6; // Roots array pointer.
60 const Register cp = s7; // JavaScript context pointer. 60 const Register cp = s7; // JavaScript context pointer.
61 const Register fp = s8_fp; // Alias for fp. 61 const Register fp = s8_fp; // Alias for fp.
62 const DoubleRegister lithiumScratchDouble = f30; // Double scratch register. 62 const DoubleRegister kLithiumScratchDouble = f30; // Double scratch register.
63 63
64 // Flags used for the AllocateInNewSpace functions. 64 // Flags used for the AllocateInNewSpace functions.
65 enum AllocationFlags { 65 enum AllocationFlags {
66 // No special flags. 66 // No special flags.
67 NO_ALLOCATION_FLAGS = 0, 67 NO_ALLOCATION_FLAGS = 0,
68 // Return the pointer to the allocated already tagged as a heap object. 68 // Return the pointer to the allocated already tagged as a heap object.
69 TAG_OBJECT = 1 << 0, 69 TAG_OBJECT = 1 << 0,
70 // The content of the result register already contains the allocation top in 70 // The content of the result register already contains the allocation top in
71 // new space. 71 // new space.
72 RESULT_CONTAINS_TOP = 1 << 1, 72 RESULT_CONTAINS_TOP = 1 << 1,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // --------------------------------------------------------------------------- 398 // ---------------------------------------------------------------------------
399 // Inline caching support. 399 // Inline caching support.
400 400
401 // Generate code for checking access rights - used for security checks 401 // Generate code for checking access rights - used for security checks
402 // on access to global objects across environments. The holder register 402 // on access to global objects across environments. The holder register
403 // is left untouched, whereas both scratch registers are clobbered. 403 // is left untouched, whereas both scratch registers are clobbered.
404 void CheckAccessGlobalProxy(Register holder_reg, 404 void CheckAccessGlobalProxy(Register holder_reg,
405 Register scratch, 405 Register scratch,
406 Label* miss); 406 Label* miss);
407 407
408 void GetNumberHash(Register reg0, Register scratch);
408 409
409 void LoadFromNumberDictionary(Label* miss, 410 void LoadFromNumberDictionary(Label* miss,
410 Register elements, 411 Register elements,
411 Register key, 412 Register key,
412 Register result, 413 Register result,
413 Register reg0, 414 Register reg0,
414 Register reg1, 415 Register reg1,
415 Register reg2); 416 Register reg2);
416 417
417 418
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 void LoadContext(Register dst, int context_chain_length); 783 void LoadContext(Register dst, int context_chain_length);
783 784
784 void LoadGlobalFunction(int index, Register function); 785 void LoadGlobalFunction(int index, Register function);
785 786
786 // Load the initial map from the global function. The registers 787 // Load the initial map from the global function. The registers
787 // function and map can be the same, function is then overwritten. 788 // function and map can be the same, function is then overwritten.
788 void LoadGlobalFunctionInitialMap(Register function, 789 void LoadGlobalFunctionInitialMap(Register function,
789 Register map, 790 Register map,
790 Register scratch); 791 Register scratch);
791 792
793 void InitializeRootRegister() {
794 ExternalReference roots_array_start =
795 ExternalReference::roots_array_start(isolate());
796 li(kRootRegister, Operand(roots_array_start));
797 }
792 798
793 // ------------------------------------------------------------------------- 799 // -------------------------------------------------------------------------
794 // JavaScript invokes. 800 // JavaScript invokes.
795 801
796 // Setup call kind marking in t1. The method takes t1 as an 802 // Set up call kind marking in t1. The method takes t1 as an
797 // explicit first parameter to make the code more readable at the 803 // explicit first parameter to make the code more readable at the
798 // call sites. 804 // call sites.
799 void SetCallKind(Register dst, CallKind kind); 805 void SetCallKind(Register dst, CallKind kind);
800 806
801 // Invoke the JavaScript function code by either calling or jumping. 807 // Invoke the JavaScript function code by either calling or jumping.
802 void InvokeCode(Register code, 808 void InvokeCode(Register code,
803 const ParameterCount& expected, 809 const ParameterCount& expected,
804 const ParameterCount& actual, 810 const ParameterCount& actual,
805 InvokeFlag flag, 811 InvokeFlag flag,
806 const CallWrapper& call_wrapper, 812 const CallWrapper& call_wrapper,
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 1454 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
1449 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1455 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1450 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1456 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1451 #else 1457 #else
1452 #define ACCESS_MASM(masm) masm-> 1458 #define ACCESS_MASM(masm) masm->
1453 #endif 1459 #endif
1454 1460
1455 } } // namespace v8::internal 1461 } } // namespace v8::internal
1456 1462
1457 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 1463 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698