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

Unified Diff: src/ppc/macro-assembler-ppc.cc

Issue 1607663004: PPC: Cleanup ABI-specifc code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ppc/disasm-ppc.cc ('k') | src/ppc/simulator-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/macro-assembler-ppc.cc
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
index 552d07c9221b6bd2295d842ea75d95e298d4cbe4..3be4b526f526aa595926974394a012d562af6e0d 100644
--- a/src/ppc/macro-assembler-ppc.cc
+++ b/src/ppc/macro-assembler-ppc.cc
@@ -3087,20 +3087,21 @@ void MacroAssembler::CallCFunctionHelper(Register function,
int num_reg_arguments,
int num_double_arguments) {
DCHECK(has_frame());
-// Just call directly. The function called cannot cause a GC, or
-// allow preemption, so the return address in the link register
-// stays correct.
+
+ // Just call directly. The function called cannot cause a GC, or
+ // allow preemption, so the return address in the link register
+ // stays correct.
Register dest = function;
-#if ABI_USES_FUNCTION_DESCRIPTORS && !defined(USE_SIMULATOR)
- // AIX uses a function descriptor. When calling C code be aware
- // of this descriptor and pick up values from it
- LoadP(ToRegister(ABI_TOC_REGISTER), MemOperand(function, kPointerSize));
- LoadP(ip, MemOperand(function, 0));
- dest = ip;
-#elif ABI_CALL_VIA_IP
- Move(ip, function);
- dest = ip;
-#endif
+ if (ABI_USES_FUNCTION_DESCRIPTORS) {
+ // AIX/PPC64BE Linux uses a function descriptor. When calling C code be
+ // aware of this descriptor and pick up values from it
+ LoadP(ToRegister(ABI_TOC_REGISTER), MemOperand(function, kPointerSize));
+ LoadP(ip, MemOperand(function, 0));
+ dest = ip;
+ } else if (ABI_CALL_VIA_IP) {
+ Move(ip, function);
+ dest = ip;
+ }
Call(dest);
« no previous file with comments | « src/ppc/disasm-ppc.cc ('k') | src/ppc/simulator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698