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

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

Issue 136613003: Demystified floating point ABI function names. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/macro-assembler-mips.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3499 matching lines...) Expand 10 before | Expand all | Expand 10 after
3510 SmiCheckType smi_check_type) { 3510 SmiCheckType smi_check_type) {
3511 if (smi_check_type == DO_SMI_CHECK) { 3511 if (smi_check_type == DO_SMI_CHECK) {
3512 JumpIfSmi(obj, fail); 3512 JumpIfSmi(obj, fail);
3513 } 3513 }
3514 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 3514 lw(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
3515 LoadRoot(at, index); 3515 LoadRoot(at, index);
3516 Branch(fail, ne, scratch, Operand(at)); 3516 Branch(fail, ne, scratch, Operand(at));
3517 } 3517 }
3518 3518
3519 3519
3520 void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) { 3520 void MacroAssembler::MovFromFloatResult(DoubleRegister dst) {
3521 if (IsMipsSoftFloatABI) { 3521 if (IsMipsSoftFloatABI) {
3522 Move(dst, v0, v1); 3522 Move(dst, v0, v1);
3523 } else { 3523 } else {
3524 Move(dst, f0); // Reg f0 is o32 ABI FP return value. 3524 Move(dst, f0); // Reg f0 is o32 ABI FP return value.
3525 } 3525 }
3526 } 3526 }
3527 3527
3528 3528
3529 void MacroAssembler::GetFromCDoubleArguments(const DoubleRegister dst) { 3529 void MacroAssembler::MovFromFloatParameter(DoubleRegister dst) {
3530 if (IsMipsSoftFloatABI) { 3530 if (IsMipsSoftFloatABI) {
3531 Move(dst, a0, a1); 3531 Move(dst, a0, a1);
3532 } else { 3532 } else {
3533 Move(dst, f12); // Reg f12 is o32 ABI FP first argument value. 3533 Move(dst, f12); // Reg f12 is o32 ABI FP first argument value.
3534 } 3534 }
3535 } 3535 }
3536 3536
3537 3537
3538 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) { 3538 void MacroAssembler::MovToFloatParameter(DoubleRegister src) {
3539 if (!IsMipsSoftFloatABI) { 3539 if (!IsMipsSoftFloatABI) {
3540 Move(f12, dreg); 3540 Move(f12, src);
3541 } else { 3541 } else {
3542 Move(a0, a1, dreg); 3542 Move(a0, a1, src);
3543 } 3543 }
3544 } 3544 }
3545 3545
3546 3546
3547 void MacroAssembler::SetForCDoubleResult(DoubleRegister dreg) { 3547 void MacroAssembler::MovToFloatResult(DoubleRegister src) {
3548 if (!IsMipsSoftFloatABI) { 3548 if (!IsMipsSoftFloatABI) {
3549 Move(f0, dreg); 3549 Move(f0, src);
3550 } else { 3550 } else {
3551 Move(v0, v1, dreg); 3551 Move(v0, v1, src);
3552 } 3552 }
3553 } 3553 }
3554 3554
3555 3555
3556 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1, 3556 void MacroAssembler::MovToFloatParameters(DoubleRegister src1,
3557 DoubleRegister dreg2) { 3557 DoubleRegister src2) {
3558 if (!IsMipsSoftFloatABI) { 3558 if (!IsMipsSoftFloatABI) {
3559 if (dreg2.is(f12)) { 3559 if (src2.is(f12)) {
3560 ASSERT(!dreg1.is(f14)); 3560 ASSERT(!src1.is(f14));
3561 Move(f14, dreg2); 3561 Move(f14, src2);
3562 Move(f12, dreg1); 3562 Move(f12, src1);
3563 } else { 3563 } else {
3564 Move(f12, dreg1); 3564 Move(f12, src1);
3565 Move(f14, dreg2); 3565 Move(f14, src2);
3566 } 3566 }
3567 } else { 3567 } else {
3568 Move(a0, a1, dreg1); 3568 Move(a0, a1, src1);
3569 Move(a2, a3, dreg2); 3569 Move(a2, a3, src2);
3570 } 3570 }
3571 } 3571 }
3572 3572
3573
3574 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg,
3575 Register reg) {
3576 if (!IsMipsSoftFloatABI) {
3577 Move(f12, dreg);
3578 Move(a2, reg);
3579 } else {
3580 Move(a2, reg);
3581 Move(a0, a1, dreg);
3582 }
3583 }
3584
3585 3573
3586 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) { 3574 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) {
3587 // This macro takes the dst register to make the code more readable 3575 // This macro takes the dst register to make the code more readable
3588 // at the call sites. However, the dst register has to be t1 to 3576 // at the call sites. However, the dst register has to be t1 to
3589 // follow the calling convention which requires the call type to be 3577 // follow the calling convention which requires the call type to be
3590 // in t1. 3578 // in t1.
3591 ASSERT(dst.is(t1)); 3579 ASSERT(dst.is(t1));
3592 if (call_kind == CALL_AS_FUNCTION) { 3580 if (call_kind == CALL_AS_FUNCTION) {
3593 li(dst, Operand(Smi::FromInt(1))); 3581 li(dst, Operand(Smi::FromInt(1)));
3594 } else { 3582 } else {
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
5807 opcode == BGTZL); 5795 opcode == BGTZL);
5808 opcode = (cond == eq) ? BEQ : BNE; 5796 opcode = (cond == eq) ? BEQ : BNE;
5809 instr = (instr & ~kOpcodeMask) | opcode; 5797 instr = (instr & ~kOpcodeMask) | opcode;
5810 masm_.emit(instr); 5798 masm_.emit(instr);
5811 } 5799 }
5812 5800
5813 5801
5814 } } // namespace v8::internal 5802 } } // namespace v8::internal
5815 5803
5816 #endif // V8_TARGET_ARCH_MIPS 5804 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698