https://codereview.chromium.org/209933003/diff/1/src/arm64/lithium-codegen-arm64.h
File src/arm64/lithium-codegen-arm64.h (right):
https://codereview.chromium.org/209933003/diff/1/src/arm64/lithium-codegen-arm64.h#newcode385
src/arm64/lithium-codegen-arm64.h:385:
codegen_->masm_->Mov(to_be_pushed_lr, lr);
On 2014/03/24 12:23:51, ulan wrote:
On 2014/03/24 11:43:28, vincent.belliard.arm wrote:
> On 2014/03/24 11:31:26, ulan wrote:
> > On 2014/03/24 11:16:59, vincent.belliard.arm wrote:
> > > On 2014/03/24 11:09:25, ulan wrote:
> > > > to_be_pushed_lr is ip0, how do we guarantee that this doesn't
get
> clobbered
> > > from
> > > > this point until the StoreRegistersStateStub gets control?
> > >
> > > This register is reserved by the UseScratchRegisterScope so it
cannot be
> used
> > by
> > > the call (which will use the next register: ip1).
> > >
> > > After the call, we jump directly to the stub code (which has its
own
> context)
> > > which starts also by a UseScratchRegisterScope which also
reserves
> > > to_be_pushed_lr.
> > Right, and what if the ip0 is not available in the current scope
because it
> was
> > already reserved before PushSafepointRegistersScope?
>
> In debug, Acquire checks that the register is available. If each
instruction
> which use a PushSafepointRegistersScope is used by the at least one
test (I
hope
> all are used) and if the tests are run in debug, it will ensure that
the
> register will be available.
>
> In release, the register could be unavailable and still acquired (no
test is
> done during acquire). If it's not available, we will clobber it.
However, it
> doesn't matter because as we enter PushSafepointRegistersScope, only
the
> safepoint registers must be saved and ip0, ip1 can be cloberred.
OK, thank you for explanation. I went through the call sites of
PushSafepointRegistersScope, and they seem safe to me. Since
Acquire(reg) is
unsafe in general case, let's rename it to UnsafeAcquire and add a
comment there
explaining when one can use it.
done
https://codereview.chromium.org/209933003/diff/1/src/arm64/macro-assembler-arm64.h
File src/arm64/macro-assembler-arm64.h (right):
https://codereview.chromium.org/209933003/diff/1/src/arm64/macro-assembler-arm64.h#newcode2218
src/arm64/macro-assembler-arm64.h:2218: Register Acquire(const Register&
reg) {
On 2014/03/24 12:23:51, ulan wrote:
Please rename to UnsafeAcquire or something similar.
done
https://codereview.chromium.org/209933003/diff/1/src/arm64/macro-assembler-arm64.h#newcode2222
src/arm64/macro-assembler-arm64.h:2222: return
AcquireFixed(availablefp_, reg);
On 2014/03/24 12:23:51, ulan wrote:
It is not used and unsafe, please remove.
done
https://codereview.chromium.org/209933003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.