| Index: src/arm/macro-assembler-arm.cc
|
| ===================================================================
|
| --- src/arm/macro-assembler-arm.cc (revision 6941)
|
| +++ src/arm/macro-assembler-arm.cc (working copy)
|
| @@ -519,6 +519,49 @@
|
| }
|
|
|
|
|
| +void MacroAssembler::ClearFPSCRBits(const uint32_t bits_to_clear,
|
| + const Register scratch,
|
| + const Condition cond) {
|
| + vmrs(scratch, cond);
|
| + bic(scratch, scratch, Operand(bits_to_clear), LeaveCC, cond);
|
| + vmsr(scratch, cond);
|
| +}
|
| +
|
| +
|
| +void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1,
|
| + const DwVfpRegister src2,
|
| + const Condition cond) {
|
| + // Compare and move FPSCR flags to the normal condition flags.
|
| + VFPCompareAndLoadFlags(src1, src2, pc, cond);
|
| +}
|
| +
|
| +void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1,
|
| + const double src2,
|
| + const Condition cond) {
|
| + // Compare and move FPSCR flags to the normal condition flags.
|
| + VFPCompareAndLoadFlags(src1, src2, pc, cond);
|
| +}
|
| +
|
| +
|
| +void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1,
|
| + const DwVfpRegister src2,
|
| + const Register fpscr_flags,
|
| + const Condition cond) {
|
| + // Compare and load FPSCR.
|
| + vcmp(src1, src2, cond);
|
| + vmrs(fpscr_flags, cond);
|
| +}
|
| +
|
| +void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1,
|
| + const double src2,
|
| + const Register fpscr_flags,
|
| + const Condition cond) {
|
| + // Compare and load FPSCR.
|
| + vcmp(src1, src2, cond);
|
| + vmrs(fpscr_flags, cond);
|
| +}
|
| +
|
| +
|
| void MacroAssembler::EnterFrame(StackFrame::Type type) {
|
| // r0-r3: preserved
|
| stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
|
| @@ -675,7 +718,8 @@
|
| Handle<Code> code_constant,
|
| Register code_reg,
|
| Label* done,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| bool definitely_matches = false;
|
| Label regular_invoke;
|
|
|
| @@ -732,6 +776,7 @@
|
| Builtins::ArgumentsAdaptorTrampoline));
|
| if (flag == CALL_FUNCTION) {
|
| Call(adaptor, RelocInfo::CODE_TARGET);
|
| + if (post_call_generator != NULL) post_call_generator->Generate();
|
| b(done);
|
| } else {
|
| Jump(adaptor, RelocInfo::CODE_TARGET);
|
| @@ -744,12 +789,15 @@
|
| void MacroAssembler::InvokeCode(Register code,
|
| const ParameterCount& expected,
|
| const ParameterCount& actual,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| Label done;
|
|
|
| - InvokePrologue(expected, actual, Handle<Code>::null(), code, &done, flag);
|
| + InvokePrologue(expected, actual, Handle<Code>::null(), code, &done, flag,
|
| + post_call_generator);
|
| if (flag == CALL_FUNCTION) {
|
| Call(code);
|
| + if (post_call_generator != NULL) post_call_generator->Generate();
|
| } else {
|
| ASSERT(flag == JUMP_FUNCTION);
|
| Jump(code);
|
| @@ -783,7 +831,8 @@
|
|
|
| void MacroAssembler::InvokeFunction(Register fun,
|
| const ParameterCount& actual,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| // Contract with called JS functions requires that function is passed in r1.
|
| ASSERT(fun.is(r1));
|
|
|
| @@ -800,7 +849,7 @@
|
| FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
|
|
|
| ParameterCount expected(expected_reg);
|
| - InvokeCode(code_reg, expected, actual, flag);
|
| + InvokeCode(code_reg, expected, actual, flag, post_call_generator);
|
| }
|
|
|
|
|
| @@ -1671,10 +1720,12 @@
|
|
|
|
|
| void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
| - InvokeJSFlags flags) {
|
| + InvokeJSFlags flags,
|
| + PostCallGenerator* post_call_generator) {
|
| GetBuiltinEntry(r2, id);
|
| if (flags == CALL_JS) {
|
| Call(r2);
|
| + if (post_call_generator != NULL) post_call_generator->Generate();
|
| } else {
|
| ASSERT(flags == JUMP_JS);
|
| Jump(r2);
|
| @@ -1797,7 +1848,7 @@
|
| }
|
| #endif
|
| // Disable stub call restrictions to always allow calls to abort.
|
| - set_allow_stub_calls(true);
|
| + AllowStubCallsScope allow_scope(this, true);
|
|
|
| mov(r0, Operand(p0));
|
| push(r0);
|
|
|