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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 259013: Align the stack correctly on ARM on calls to fp operation helpers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/arm/assembler-arm.h ('k') | src/arm/macro-assembler-arm.h » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 5043 matching lines...) Expand 10 before | Expand all | Expand 10 after
5054 __ bind(&finished_loading_r1); 5054 __ bind(&finished_loading_r1);
5055 5055
5056 __ bind(&do_the_call); 5056 __ bind(&do_the_call);
5057 // r0: Left value (least significant part of mantissa). 5057 // r0: Left value (least significant part of mantissa).
5058 // r1: Left value (sign, exponent, top of mantissa). 5058 // r1: Left value (sign, exponent, top of mantissa).
5059 // r2: Right value (least significant part of mantissa). 5059 // r2: Right value (least significant part of mantissa).
5060 // r3: Right value (sign, exponent, top of mantissa). 5060 // r3: Right value (sign, exponent, top of mantissa).
5061 // r5: Address of heap number for result. 5061 // r5: Address of heap number for result.
5062 __ push(lr); // For later. 5062 __ push(lr); // For later.
5063 __ push(r5); // Address of heap number that is answer. 5063 __ push(r5); // Address of heap number that is answer.
5064 __ AlignStack(0);
5064 // Call C routine that may not cause GC or other trouble. 5065 // Call C routine that may not cause GC or other trouble.
5065 __ mov(r5, Operand(ExternalReference::double_fp_operation(operation))); 5066 __ mov(r5, Operand(ExternalReference::double_fp_operation(operation)));
5066 __ Call(r5); 5067 __ Call(r5);
5068 __ pop(r4); // Address of heap number.
5069 __ cmp(r4, Operand(Smi::FromInt(0)));
5070 __ pop(r4, eq); // Conditional pop instruction to get rid of alignment push.
5067 // Store answer in the overwritable heap number. 5071 // Store answer in the overwritable heap number.
5068 __ pop(r4);
5069 #if !defined(USE_ARM_EABI) 5072 #if !defined(USE_ARM_EABI)
5070 // Double returned in fp coprocessor register 0 and 1, encoded as register 5073 // Double returned in fp coprocessor register 0 and 1, encoded as register
5071 // cr8. Offsets must be divisible by 4 for coprocessor so we need to 5074 // cr8. Offsets must be divisible by 4 for coprocessor so we need to
5072 // substract the tag from r4. 5075 // substract the tag from r4.
5073 __ sub(r5, r4, Operand(kHeapObjectTag)); 5076 __ sub(r5, r4, Operand(kHeapObjectTag));
5074 __ stc(p1, cr8, MemOperand(r5, HeapNumber::kValueOffset)); 5077 __ stc(p1, cr8, MemOperand(r5, HeapNumber::kValueOffset));
5075 #else 5078 #else
5076 // Double returned in registers 0 and 1. 5079 // Double returned in registers 0 and 1.
5077 __ str(r0, FieldMemOperand(r4, HeapNumber::kValueOffset)); 5080 __ str(r0, FieldMemOperand(r4, HeapNumber::kValueOffset));
5078 __ str(r1, FieldMemOperand(r4, HeapNumber::kValueOffset + 4)); 5081 __ str(r1, FieldMemOperand(r4, HeapNumber::kValueOffset + 4));
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
6253 int CompareStub::MinorKey() { 6256 int CompareStub::MinorKey() {
6254 // Encode the two parameters in a unique 16 bit value. 6257 // Encode the two parameters in a unique 16 bit value.
6255 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6258 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6256 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6259 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6257 } 6260 }
6258 6261
6259 6262
6260 #undef __ 6263 #undef __
6261 6264
6262 } } // namespace v8::internal 6265 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698