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

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

Issue 7307004: Fix ABI for API calls on ia32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address review feedback Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 // Calls a C function and cleans up the space for arguments allocated 551 // Calls a C function and cleans up the space for arguments allocated
552 // by PrepareCallCFunction. The called function is not allowed to trigger a 552 // by PrepareCallCFunction. The called function is not allowed to trigger a
553 // garbage collection, since that might move the code and invalidate the 553 // garbage collection, since that might move the code and invalidate the
554 // return address (unless this is somehow accounted for by the called 554 // return address (unless this is somehow accounted for by the called
555 // function). 555 // function).
556 void CallCFunction(ExternalReference function, int num_arguments); 556 void CallCFunction(ExternalReference function, int num_arguments);
557 void CallCFunction(Register function, int num_arguments); 557 void CallCFunction(Register function, int num_arguments);
558 558
559 // Prepares stack to put arguments (aligns and so on). Reserves 559 // Prepares stack to put arguments (aligns and so on). Reserves
560 // space for return value if needed (assumes the return value is a handle). 560 // space for return value if needed (assumes the return value is a handle).
561 // Uses callee-saved esi to restore stack state after call. Arguments must be 561 // Arguments must be stored in ApiParameterOperand(0), ApiParameterOperand(1)
562 // stored in ApiParameterOperand(0), ApiParameterOperand(1) etc. Saves 562 // etc. Saves context (esi). If space was reserved for return value then
563 // context (esi). 563 // stores the pointer to the reserved slot into esi.
564 void PrepareCallApiFunction(int argc, Register scratch); 564 void PrepareCallApiFunction(int argc);
565 565
566 // Calls an API function. Allocates HandleScope, extracts 566 // Calls an API function. Allocates HandleScope, extracts
567 // returned value from handle and propagates exceptions. 567 // returned value from handle and propagates exceptions.
568 // Clobbers ebx, edi and caller-save registers. Restores context. 568 // Clobbers ebx, edi and caller-save registers. Restores context.
569 // On return removes stack_space * kPointerSize (GCed). 569 // On return removes stack_space * kPointerSize (GCed).
570 MaybeObject* TryCallApiFunctionAndReturn(ApiFunction* function, 570 MaybeObject* TryCallApiFunctionAndReturn(ApiFunction* function,
571 int stack_space); 571 int stack_space);
572 572
573 // Jump to a runtime routine. 573 // Jump to a runtime routine.
574 void JumpToExternalReference(const ExternalReference& ext); 574 void JumpToExternalReference(const ExternalReference& ext);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } \ 787 } \
788 masm-> 788 masm->
789 #else 789 #else
790 #define ACCESS_MASM(masm) masm-> 790 #define ACCESS_MASM(masm) masm->
791 #endif 791 #endif
792 792
793 793
794 } } // namespace v8::internal 794 } } // namespace v8::internal
795 795
796 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 796 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698